Reputation: 4008
I am using jquery datatables plugin. The row click functionality is working fine on the first page, when I go to any of the next pages, the row click doesn't work with .on("click", function() { ....});
I tried to replace .on()
with .live()
and seems to work fine. My concern is .live()
has been deprecated since jquery 1.7. Is it a bug with the .on()
or am I missing something ?
Upvotes: 0
Views: 326
Reputation: 144739
If you want to delegate the event using on
method, you should code:
$(document).on("click", "selector", function() { ....});
or:
$('staticParent').on("click", "dynamicDescendant", function() { ....});
Upvotes: 2