Need to fire function after page event
Need to fire function after page event
DavidBoomer
Posts: 21Questions: 0Answers: 0
The page event in the following code snippet fires before the paging event has actually occurred.
$('#dataTableID').live('page', function () { logWhateverShowsInCell2(); });
Is there a way to attach an event listener for after the paging?
FWIW, "fnDrawCallback" : logWhateverShowsInCell2(), ... only fires for the initial loading of the dataTable, not on subsequent events like paging, sorting, filtering, etc...
$('#dataTableID').live('page', function () { logWhateverShowsInCell2(); });
Is there a way to attach an event listener for after the paging?
FWIW, "fnDrawCallback" : logWhateverShowsInCell2(), ... only fires for the initial loading of the dataTable, not on subsequent events like paging, sorting, filtering, etc...
This discussion has been closed.
Replies
Allan
Sure just add it in the same way you would add any jQuery event listener. The exact order would depend upon the order the events are added and the sequence in which jQuery fires the events. I suspect if you add it after the table has been initialised it should work okay.
Allan
$("#dataTableID_paginate").on("click", "a", function() { alert("clicked") });