Callback with Datatable.ajax.reload

Callback with Datatable.ajax.reload

anemaanema Posts: 14Questions: 7Answers: 0

Hi I am trying to execute a statement after datable_name.ajax.reload(null, false);
Below is mycode:

datable_name.ajax.reload(null, false);
$('#div_id').removeClass().addClass("text-green").html("Message").fadeIn();

My code is working, but the second line is not waiting for the complete execution of data table reload.
I want second line should execute only after complete the execution of first line.

How I can do that. is there any way I can user call back in reload.?

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    According to the ajax.reload() docs the first parameter is the callback. Replace null with your callback.

    Kevin

This discussion has been closed.