jmpressjs / jmpress.js

A jQuery plugin to build a website on the infinite canvas
http://jmpressjs.github.com/jmpress.js
1.5k stars 237 forks source link

Go to specific slide by on click event #134

Closed TomRaas closed 10 years ago

TomRaas commented 10 years ago

Hi, I have observed all the post on this git but can't seem to find a post that is telling me insectly how to navigate to a specific slide! Going to the next or previous page by on click works in my application, but I can't seem to find a way to go to specific pages. I've read posts were specific slides were invoked, so i guess it's possible.

Can somebody help me please?

Thanks in advance!

Greetings Tom

sokra commented 10 years ago

http://jmpressjs.github.io/docs/core.html

see method goTo.

Don't forget to return false from the event listener if the clickable element is on a slide.


Or you can just use a link to a hashtag

<a href="#idOfSlide">goto slide</a>
TomRaas commented 10 years ago

Thank you very much!!, hahah so easy!!

endil920 commented 10 years ago

why is it necessary to return false from the event listener if the clickable element is on a slide?

sokra commented 10 years ago

The event would bubble up to the slide and a click on a slide is threaded as "move to this slide".

endil920 commented 10 years ago

I see, thank you!