/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Jan 13 2025 | 04:30:43 */
jQuery(document).ready(function() {
if (jQuery('#vigilanceaanalyticalstudies48').length) {
var table = jQuery('#vigilanceaanalyticalstudies48').DataTable();
function updatePagination() {
var paginationContainer = $('#vigilanceaanalyticalstudies48_paginate');
paginationContainer.empty();
// Check if table has data loaded
var recordsDisplay = table.page.info().recordsDisplay;
if (recordsDisplay === 0) {
// No records to paginate
return;
}
var pages = Math.ceil(recordsDisplay / table.page.len());
var currentPage = table.page.info().page + 1;
if (pages > 1) {
for (var i = 1; i <= pages; i++) {
if (i === currentPage) {
paginationContainer.append('');
} else {
paginationContainer.append('');
}
}
}
}
jQuery(document).on('click', '.dot', function() {
var pageNum = jQuery(this).index();
table.page(pageNum).draw(false);
updatePagination();
});
table.on('draw', function() {
updatePagination();
});
}
});