3D FlipBook - Can I jump to and specific page with jquery or javascript?

g***n@gmail.com
2019-11-29
2019-12-03

Hello, I bought your jquery version and so far I'm very satisfied with the product. But I have a problem, I need to change to specific pages at user will after the script as loaded. So far I can reload the website using the urlParam fb3d-page with the page I need. By example (my script it's running at http://localhost/flip/visor.cgi):

http://localhost/flip/visor.cgi?fb3d-page=10 // Takes me to page 10

http://localhost/flip/visor.cgi?fb3d-page=50 // Takes me to page 50

But I was wondering if I can change the page with Jquery or Javascript in such way I can avoid to reload the website every time I need to change the page.

Thank you in advance.

Replies

a***r@3dflipbook.net
2019-12-03
2019-12-03
$('#container').FlipBook({
        ...,
        ready: function(scene) {
          scene.ctrl.goToPage(10);
        }
});
g***n@gmail.com
2019-12-03
2019-12-04

Works amazing! Here's what I'm doing in case somebody it's looking for something similar:

ready: function(scene) { /

        myinterval=setInterval(function() { // Set an interval to verify changes every second

            numPag=loadpage(); // loadpage verify on my database if there's any change on the page number by admin user
            if (numPag>-1) {
                scene.ctrl.goToPage(numPag); // Please remember, pages starts at 0
            }
            else {
                clearInterval(myinterval); // If loadpage returns -1, it means there's no need to verify changes, so kill the interval. 
            }
        },1000); // 1 second

    }
Log In to leave a comment