How to track Datatable changes to display a page number using draw event on jQuery?
Here you go working code:
jQuery('#cleaning_schedule').on('draw.dt', function() {
//your code
var recordsTotal = jQuery('#cleaning_schedule').DataTable().page.info()['recordsTotal'];
var on_page_now = jQuery('#cleaning_schedule').DataTable().rows().count();
var curr_page_now = parseInt(jQuery('#cleaning_schedule').DataTable().page.info()['page'])+1;
var curr_page_tot = jQuery('#cleaning_schedule').DataTable().page.info()['pages'];
});