简体   繁体   中英

Issue with pagination of jQuery control Datatable

I am using a datatable to show some information on page and I am binding a click event dynamically to the row of table. It works fine for the first page, but, when I navigate to the second page, the click event is not fired. I can not use .live() or .delegate() as my application is single page application and as per my knowledge these functions attach an event handler for all elements which match the current selector, now and in the future. So, can anybody please give me some suitable solution?

Declare your click event BEFORE dataTable initiation, then it should works.

Hope this help :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM