Skip to content

Instantly share code, notes, and snippets.

@frankydp
Created April 21, 2015 13:25
Show Gist options
  • Select an option

  • Save frankydp/fde0434b119d5b2dce56 to your computer and use it in GitHub Desktop.

Select an option

Save frankydp/fde0434b119d5b2dce56 to your computer and use it in GitHub Desktop.
ShepardJS event bind to only have one tutorial open at a time.
var tutorialMaster = [
"tutorialOne",
"tutorialTwo",
"tutorialThree"
];
function closeOtherTutorials () {
for (tut in tutorialMaster) {
window[tutorialMaster[tut]].cancel() //Or however you track your tutorials.
}
}
//Event hook to prevent multiple tutorials
Shepherd.on('show', function() {closeOtherTutorials()})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment