Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to jump to a certain page on page load? #8

Closed
Lepre opened this issue Apr 17, 2013 · 2 comments
Closed

Is it possible to jump to a certain page on page load? #8

Lepre opened this issue Apr 17, 2013 · 2 comments

Comments

@Lepre
Copy link

Lepre commented Apr 17, 2013

Hello,

And thanks for the great plugin. I was wondering if its possible to jump to a certain page, aka if url is something like below. In this case the to a second page of Book. So if the user writes down url like below, the Book would open to this page.

http://xxx.something.com/content.html#item2

@botelho
Copy link
Member

botelho commented May 10, 2013

Hi, I guess you can extract the "item2" value with js and then jump to a specific page by calling the jump(position) function. Bookblock itself does not provide any way to extract values from the url, but I am sure you have plenty of options to do that.

@botelho botelho closed this as completed May 10, 2013
@denerFernandes
Copy link

Hi,

Using example: http://tympanus.net/Tutorials/FullscreenBookBlock/

In: Page.js include in function initEvents() {....

// jump a menu item
$(document).ready(function(){
var hash = location.hash;
bb.jump( hash.replace( /^#/, "") );
} );

User Url: index.html#1 (Number page).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants