Pagination plug-in | Automatic Pagination
Pagination plug-in | Automatic Pagination
amommendes
Posts: 7Questions: 1Answers: 0
Dear all,
Is there some way to change pages automatically, in a time interval?
Thanks in advance
This question has accepted answers - jump to:
This discussion has been closed.
Answers
No plugin.. But theres a super-duper-awesome API that can do it.
I was able to get this done in less than 10 lines of code.
Working example
Hello!!
You are right, awsome API.
Thank you so much!!
Regards...
This is why I love doing DataTables. I wouldn't have thought of doing something quite like that - despite having written dashboard pages in the past.
Nice work all around :-)
Allan
Same. Actually, im creating a dashboard that ill use it for.
I think ill have the interval quit when anything is clicked or focused though.
Thanks jLinux!
I also need this to do a Dashboard and it will work very well...
I'm very new to js. How could I create a loop in your code, in order to return to the first page from the table when table.page()+1 === pageInfo.end ?
I was trying the follow:
Sure
http://live.datatables.net/xikefome/3/edit?js,output
That starts the loop over.. is that what you wanted?
If you just wanted it to go back to the first page and clear, then this should suffice
If you want it to quit when they click on anything for the table, you can use
However though, that CSS Selector isn't table-specific, it will cover any DataTable, so if you have multiple tables, if any of them are clicked on, then it will stop the auto-pagination.
I thought about using something like
And even though thats table specific, it only covers the actual
table
, not the pagination div, the length selector, select box, etcPerfect jLinux!
Thanks again! It was very, very useful!!!
Hey, thanks for the great idea
jLinux,
By the way, are you implementing this dashboard with datatables in Pentaho CDE?
I have no idea what pentaho cde is
Ok! :)
Thanks again!!
I didn't either - but it looks fairly cool. Must update my own at some point...
Allan
Really, it is.. There is a community free and open source. They use dataTable to renderize table on dashboards.
Must be good then ;-).