I have this code:
$("#office-select").change(function(){
oTable.api().ajax.reload();
});
where oTable
is my datatable. Everything works, but I want the old table to be hidden while the new one is loading. There should only be a spinner shown.
I tried something along these lines:
$("#office-select").change(function(){
oTable.clear();
oTable.api().ajax.reload();
});
but it did not work. Any ideas on how to achieve this?