Reputation: 158
I need to run a line of js code after the datatable has rendered, is there an API setting to do that? I tried initComplete and this function gets executed after initialization
Upvotes: 0
Views: 168
Reputation: 58880
You can use drawCallback
option to define a function that is called every time the table is redrawn.
$('#example').dataTable( {
"drawCallback": function( settings ) {
alert( 'DataTables has redrawn the table' );
}
} );
Upvotes: 1