-1

My code...

$(document).ready(function () {
    my_func();
}

function my_func(){
    $(".my_class").css("background","red");
}

...seems that works only on displayed elements, but is not working on hidden elements, that are in the oter page of Datatable pagination.

My solution could be putting my_func() calling after the page-change. But how?

Other solution?

Gianluca Demarinis
  • 1,964
  • 2
  • 15
  • 21

1 Answers1

1

My first solution

$('#example').dataTable( {
    "drawCallback": function( settings ) {
        alert( 'DataTables has redrawn the table' );
    }
} );
Gianluca Demarinis
  • 1,964
  • 2
  • 15
  • 21
  • This doesn't appear to be an answer. If you're trying to add more information to the question please use the `edit` link under the question itself. – Rory McCrossan Oct 04 '19 at 08:32