Created
April 21, 2015 13:25
-
-
Save frankydp/fde0434b119d5b2dce56 to your computer and use it in GitHub Desktop.
ShepardJS event bind to only have one tutorial open at a time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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