DataTables has 3 options for using ajax: url, ajax object, and custom function.
I'm using the custom function option, and I'm trying to figure out how to set a different ajax function after the DataTables creation.
I've seen ajax.reload, but this only seem to work with the url ajax option. Any idea how to reset a custom function and reload the data?
As an example, I'd like to be able to do this:
// Create DataTable
dt = $('#MyTable').DataTable({
ajax: function(input, callback, settings) {...}
});
// Update Ajax with a new function call
function updateAjax() {
// reload with new ajax function.
dt.ajax.reload(function(input, callback, settings) {...})
}