Skip to content

Instantly share code, notes, and snippets.

@first-developer
Forked from mrsweaters/pause_and_resume.md
Created May 26, 2013 20:59
Show Gist options
  • Save first-developer/5654016 to your computer and use it in GitHub Desktop.
Save first-developer/5654016 to your computer and use it in GitHub Desktop.

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.

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