简体   繁体   中英

jKit paginate automating the page change

I have this example: http://jsfiddle.net/bwk43/4/

I have been looking for a while for a method of turning a table into a pages like so but I am still struggling to find something that can automate the page change every 10 minutes or so.

I am using this in a TV display for some information from a database and it needs to change automatically as the display its on is somewhat like a board for flight times in a airport so no keyboard and mouse will be attached.

The only events I can see for this plugin are triggered when pages load so not sure how to tie these in with the initial load.

Any help would be appreciated.

Plugin Source:
http://jquery-jkit.com/commands/paginate.html

Well it adds an li list at the bottom so you can just call click on them

(function(){
    var waitTime = 1000*60*10;
    function showPage() {
        var lis = $(".jkit-pagination").find("li");  //get the lis
        var next = lis.filter(".active").next();     //find the next li after the active one
        if (!next.length) next = lis.eq(0);          //if it is the last li, switch to first
        next.click();                                //click it
        window.setTimeout(showPage,waitTime);      //set timer to do it all over again
    }    
    window.setTimeout(showPage,waitTime);          //wait for initial page to have its time
})();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM