I want to call jquery function on click of a bootstrap pagination link.
Supppose I want to traverse from page 1 to 2, a jquery function should be called.
I am using following code but it is not working:
$("ul.pagination").on("click","li", function(){
alert("page changed");
});
I want to call jquery function on click of a bootstrap pagination link.
Supppose I want to traverse from page 1 to 2, a jquery function should be called.
I am using following code but it is not working:
$("ul.pagination").on("click","li", function(){
alert("page changed");
});
Share
Improve this question
edited Oct 5, 2015 at 17:20
HaveNoDisplayName
8,517106 gold badges40 silver badges50 bronze badges
asked Oct 5, 2015 at 15:50
user3653474user3653474
3,8489 gold badges64 silver badges171 bronze badges
1 Answer
Reset to default 6use ul.pagination li a
for event like this http://jsfiddle/mig1098/fdfaLrnz/
$('ul.pagination li a').on('click',function(e){
/* your code*/
});