I am trying to use this row highlight function and it works when the page is loaded but when I use the pagination the function doesn’t seem to stay on. The row no longer will highlight.
$("#json-table tbody tr").on("click", function(event){
$(this).toggleClass('row_selected');
});
Try:
Because you reload the table, you have to bind the
on()handler to something that won’t be replaced, so use either#json-tableif you only alter the children, or its parent if not.