Hi,
jQuery('#TheTable tr').each(function() {
jQuery('td', this).slice(-1).on('click', function() {
var tr = $(this).closest('tr');
var row = table.row( tr );
if (row.data() != undefined){
modalfunc(row.data().id);
}
});
});
It's working great when table is loaded but then if user enter something in searchbox and data is filtered - the event is not triggered when clicked on the column's cells. How to adapt this code to dynamically created elements?