pageinfo.end coming wrong in my datatable example.
pageinfo.end coming wrong in my datatable example.
kapilsumanth
Posts: 2Questions: 2Answers: 0
var pageInfo = table.page.info(),
// Set the ending interval to the last page
// endInt = pageInfo.end,
// // Current page
// currentInt = 0,
// Start an interval to go to the "next" page every 3 seconds
interval = setInterval(function(){
// "Next" ...
table.page( 'next' ).draw( 'page' );
// Increment the current page int
//currentInt++;
//alert("cureeent==="+currentInt);
alert("pageinfo=="+pageInfo.end);
alert("endpage==="+table.page()+1);
// If were on the last page, reset the currentInt to the first page #
if ( table.page()+1 === pageInfo.end){
}~~~~~~~~~~~~
}, 5000); // 3 seconds
//var interval = setInterval(autoPagination,10000);
} );
This discussion has been closed.
Answers
Please provide more information. What is wrong with it? Please post a link to your page or a test case showing the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin