Add class to all cells, not just first page results

Add class to all cells, not just first page results

tahoma403tahoma403 Posts: 3Questions: 2Answers: 0

I have no control over the creation/configuration of my DataTable, so I'm using this script to add classes to the table cells:
$("table").on('init.dt',function(){
$("td").addClass("td-styles");
});
But it only works for the table displayed on the first page - when I click "Next" to display more results, the classes are not applied. Is there a way to add it to the entire table?

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.