Reputation: 2167
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?
Upvotes: 0
Views: 780
Reputation: 2794
Declare your click event BEFORE dataTable initiation, then it should works.
Hope this help :)
Upvotes: 2