event gets called before data is loaded?
event gets called before data is loaded?
sachin111
Posts: 2Questions: 1Answers: 0
I want to call one js functionality on paginate page change occurs. I used firstly page event but it occurs before loading of data. draw event also occurs before load of data. so when i js functionality doesnt find element. plz help
var table = $('table#location_tbl').DataTable({
"pageLength": 5,,
}).on( 'draw', function () {
alert( 'Redraw occurred. ' );
} );
This discussion has been closed.
Answers
Hi @sachin111 ,
The
draw
would only be called after the data has loaded, see the example here. Are you seeing something that makes it look like it's being called before? Feel free to edit my example if you can demonstrate it,Cheers,
Colin