最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Call jquery function on click of a bootstrap pagination link - Stack Overflow

programmeradmin2浏览0评论

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
Add a ment  | 

1 Answer 1

Reset to default 6

use ul.pagination li a for event like this http://jsfiddle/mig1098/fdfaLrnz/

$('ul.pagination li a').on('click',function(e){
    /* your code*/
});
发布评论

评论列表(0)

  1. 暂无评论