Skip to content

Instantly share code, notes, and snippets.

@mrsweaters
Created August 22, 2012 23:36
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save mrsweaters/3430584 to your computer and use it in GitHub Desktop.
Save mrsweaters/3430584 to your computer and use it in GitHub Desktop.
Joyride 2 Pause and Resume Example

The below configuration will pause the tour after tooltip 2 has appeared (index of 1). In the postStepCallback we check to see if the tour has been paused and fire some code.

<script>
  $(window).load(function() {
    $('#joyRideTipContent').joyride({
      pauseAfter : [1],
      postStepCallback : function (index, tip) {
        if ($(this).joyride('paused')) {
          console.log('Hey there, you\'ve paused the tour.');
          // fire your code here
        }
      }
    });
  });
</script>

When our code has finished executing we can fire $(window).joyride('resume'); and the tour will continue.

@sumitii
Copy link

sumitii commented Aug 22, 2014

This does not work for the resume function. Any way to fix? I've tried a couple different things to get my tour to restart but no luck so far. Please help, thanks!

@dephora
Copy link

dephora commented Sep 4, 2015

I too am having issues with the resume portion. Was this ever resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment