prashant
prashant

Reputation: 2167

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?

Upvotes: 0

Views: 780

Answers (1)

shennyL
shennyL

Reputation: 2794

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

Hope this help :)

Upvotes: 2

Related Questions