automatic switching between pages
automatic switching between pages
Hello, please tell me how to implement this: we need to make the transition between pages to start automatically at a specific interval of time and reaching the last page back to the first.
it will be something like the flight schedules
it will be something like the flight schedules
This discussion has been closed.
Replies
Allan
I still need something like this ...
http://live.datatables.net/#source
and after the last page back to the first
Allan
[code]
var oTable = $('#example').dataTable();
max = oTable.fnPagingInfo().iTotalPages;
ctr=0;
setInterval(function(){
if (ctr <= max){
oTable.fnPageChange( 'next' );
ctr=ctr+1;
}
else{
oTable.fnPageChange( 'first' );
ctr=0;
}
},10000);//time interval, seconds
});
[/code]