I am using Datatables and I am using this code to get clickable rows, called from fnInitComplete
:
function createClickableRowsAllTickets() {
$(allTable.fnGetNodes()).click( function() {
alert('row clicked');
});
}
This works fine. However when I use fnReloadAjax
to update the table the row clicks are no longer bound.
I tried to call the function once again on the callback of the fnReloadAjax
but it doesn't work:
$("#alltickets input[type=checkbox]").click(function() {
allTable.fnReloadAjax('get_tickets', createClickableRowsAllTickets());
});
What am I doing wrong?