Ok i have a function like
So when this function is called the AJAX request is made but if I again call the same function. The current request is made but the previous call is not killed. I want the datatable to kill any previous calls and run only the latest one.
I'm not sure how to do this.
This is how I do it with DataTables 1.10.16
var table = $('#table').DataTable({
ajax: {
url: '/datatable',
type: 'POST',
beforeSend: function() {
if (table.hasOwnProperty('settings')) {
table.settings()[0].jqXHR.abort();
}
}
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With