user969275
user969275

Reputation: 284

Display double pages using turn.js

I want to display two pages on a page load so it gives the impression the book is already opened. If for example, I want to start the page display from page 2 & 3 I would use code like this:

 $("#book").turn({page:2});

The above code works while loading the book, but it goes to page1 when I go back from page 2 and 3. Please help me to avoid this problem.

[link to turn.js]

Upvotes: 2

Views: 2490

Answers (1)

user969275
user969275

Reputation: 284

I got working by the below code :

$("#book").bind("start", function(event, pageObject) {
        if (pageObject.next == 1) {
                            event.preventDefault();
                            $('#book').turn('page', 2).turn('stop');

                        }
    });

Upvotes: 3

Related Questions