zurb / joyride

jQuery feature tour plugin.
http://www.zurb.com/playground/jquery-joyride-feature-tour-plugin
1.42k stars 241 forks source link

Pause/Resume on multiple tips #123

Open neyo opened 11 years ago

neyo commented 11 years ago

Some time ago I mentioned about having a the ability to pause/resume so that JS could be fired between tips (https://github.com/zurb/joyride/issues/20). It's great you guys listened and I hoped it'd save the day for me. However, as the tone my suggest this hasn't been quite plain sailing.

What i've found is if I define an array with more than one tip in it, the pausing just doesn't seem to work. When I leave it to one, the pause/resume appears to work as intended. Initially I thought I was doing something wrong, so I tried a variety of ways to format the array, starting with the obvious [1,2] to trying to add spaces, semicolons, etc etc.

Am I doing something wrong, or is this a bug? I assume the fact you allow an array to be specified means you intended for the tour to be perhaps stopped and resume multiple times throughout?

For the record, I was specifying the option like this:

pauseAfter : [1,2],

Calling a resume like this:

setTimeout(function () { $(".ui-autocomplete").css('display', 'none'); // Example of JS I want to fire mid-tour... $(window).joyride('resume'); }, 1000);

Could someone investigate this, and perhaps providing a working example where a tour is paused and resume successfully, whilst firing JS in between?

Thanks guys, Steve

Quae commented 11 years ago

I have also run into this issue. The documentation claims that pauserAfter takes an array ( specifically: '//array of indexes where to pause the tour after') but I cannot get pause to function correctly on anything with more than one number passed in.

I've tried hard coding '[1, 2]' as well as creating an array beforehand and just passing that in.

Is this a bug, or am I missing something key?

mpalmerlee commented 10 years ago

I'm also having the same problem, it appears that the bug isn't multiple pause indices, it seems to only happen if they are multiple contiguous indices ([1, 5, 10] works fine but [1, 2, 3] doesn't).

mpalmerlee commented 10 years ago

I issued a pull request for this bug: https://github.com/zurb/joyride/pull/179

scottbarrow commented 9 years ago

I also experienced some undesirable behavior with the pause_after setting. I believe the issue is caused by the fact that the pre_step_callback does not fire until joyride is resumed, so there doesn't seem to be a way to pause, run callback, resume. If anyone can share their experience of how a tip could be paused to allow code to run while paused, I'd greatly appreciate it.

prcongithub commented 8 years ago

Was this resolved? We are facing this same problem right now.

Owlbertz commented 8 years ago

Hi @prcongithub, unfortunately there is not much activity for this plugin at the moment. I would like to ask you to check out the PR that was mentioned above (#179) and see if that works for you.