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

next button not in 2 same consicutive data-z #137

Open sweetguy0883 opened 10 years ago

sweetguy0883 commented 10 years ago

Hello, I have 3 slides.

  1. data-z - not defined
  2. data-z - "-1000"
  3. data-z - "-1000"

Now, when I navigate from slide 1 to slide 2 with a function of $('#jmpress').jmpress('next') it is working well but the next time again when trying to navigate from slide 2 to slide 3, it is not working, instead calling the $('#jmpress').jmpress('prev') .

What I have followed is :

  1. The keys are working without any problem. (But I need the function calls as this is the main reason for me to shift from impress.js to jmpress.js).
  2. When there is a data-z defined in 2 slides and they both have the same value, the 'next' api call does not work (calls the 'prev').

Please help.

sokra commented 10 years ago

Can you please prepare a jsfiddle.

Do you call the method from a click event handler of an element on the slide? Then remember to return false to stopPropagation...

sweetguy0883 commented 10 years ago

Hello, I think the main problem aroused when the buttons were defined every time in each "step" class. Now that I have taken the buttons out of the "step" classes, they are just working perfectly. Unfortunately there were so much change in the code (shifting in between impress.js and jmpress.js) that I can't give you the exact code in the present condition. This was also the same problem in impress.js when the buttons were defined each time in the "step" class. There the buttons did not work at all. But I hope my mistake might help someone. Now I need some different functionality and will search for it and if not available then will ask in a new thread. Thanks @sokra