Hi everyone,
I'm trying to select the row where I get a positive match but can't seem to gain focus of the row that I match. Below is my code
...
var dtable = $('#datatable').dataTable().api();
dtable.rows().eq(0).each(function (index) {
var row = dtable.row(index);
var data = row.data();
if (data.Name == 'John') {
this.addClass("selected");
}
...
I've also tried $(this).closest('tr').addClass('selected') and other variations but haven't had any luck. Any pointers would be greatly appreciated!