-
Notifications
You must be signed in to change notification settings - Fork 664
Multipage + previous button = skip ahead, not backward #4
Comments
Hey Michael, I tried to reproduce the behavior you're describing but I'm having a hard time doing so. I created a sample page with a very basic demo tour page and it seems to be displaying the correct steps on each page. Take a look at that demo tour (js file here) and see if it matches up with what you're doing. If you're still having trouble, can you possibly link me to a page where I can take a look at the tour you're trying to build, or paste in the code for your tour? Thanks! |
Okay, never mind, I realize what I was missing -- the multipage option. It seems like the tour will work fine if you just omit the multipage option from your steps, so I'd recommend you do that. I think the multipage option is a vestigial part of Hopscotch that may not even be needed anymore--I may possibly even remove it, but I need to look through and make sure that doing so won't break anything. Let me know if you encounter any more problems! |
Hey Michael, so I took another look at the code and realized that the multipage option is actually necessary. I've made a small fix and I think it should work now. The example tour page I linked to in my previous comment uses the latest code and is working fine. Tour code here. Try it out and let me know if it works for you. |
Thanks Gordon! I appreciate all your work on this and on a weekend, too! This worked for me. |
Great code and I hope this project continues to be worked on.
Having an issue while going between pages on a tour and then going back to previous pages. I'm going to other pages by using the following (not sure if this is the right approach):
...
multipage: true,
onNext: function() {
document.location.href = 'index2.html';
}
...
This works as expected and I can continue to jump between pages going forward without any issue. Going backwards, however with the same logic, but in "onPrev()" sends me to the other page, but advances the steps. Therefore if step 1 = page 1, step 2 = page 2, step 3 = page 1, then when I click previous on step 2 (page 2) I am sent back to page 1, but it is now on step 3. It seems to have to do with the "multipage" variable being set.
Thanks again!
Michael
The text was updated successfully, but these errors were encountered: