Reputation: 9309
How i can get href attribute on JQuery on on
click event
Something like this:
$('.nav_step ul li').on('click', function(event){
this.$('.nav_step ul li a').href;
});
Thanks!
Upvotes: 0
Views: 75
Reputation: 38102
You can use:
$('.nav_step ul li').on('click', function(event){
console.log($(this).find('a').attr('href'));
});
Upvotes: 1
Reputation: 82231
use:
$('.nav_step ul li').on('click', function(event){
alert($(this).find('a').attr('href'));
});
Upvotes: 2