Datatables Switch Between Pages Automatically
I am trying to switch between Datatables pages automatically but I don't seem to be able to get it working. I either get a long running script and If I try adding a delay I get the
Solution 1:
Use the code below instead to cycle through all pages with interval of 1 second.
var table = $('#calendarView').DataTable();
setInterval(function(){
var info = table.page.info();
var pageNum = (info.page < info.pages) ? info.page + 1 : 1;
table.page(pageNum).draw(false);
}, 1000);
See this jsFiddle for code and demonstration.
Post a Comment for "Datatables Switch Between Pages Automatically"