In my application i am using datatables.net
var ticketHistoryDataTable = $(\'#ticketHistoryData\').DataTable({
paging: false,
data: [],
When loading data from an Ajax source, you can use the following two events to handle the "Loading..." and "Done" states.
... data table code ...
}).on('preXhr.dt', function ( e, settings, data ) {
$(".thealert").html("Loading");
}).on( 'draw.dt', function () {
$(".thealert").html("Done");
});
I hope that helps.