Created
May 12, 2014 17:46
-
-
Save mollietaylor/215f864f77be4d2fb046 to your computer and use it in GitHub Desktop.
Minimal Example in Shepherd
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
div { | |
text-align: center | |
} | |
#a { | |
border: 2px red solid; | |
height: 40px | |
} | |
#b { | |
border: 2px blue solid; | |
height: 40px | |
} |
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
<html> | |
<head> | |
<!-- Shepherd --> | |
<script type="text/javascript" src="http://github.hubspot.com/shepherd/shepherd.js"></script> | |
<!-- Shepherd themes --> | |
<link rel="stylesheet" href="http://github.hubspot.com/shepherd/css/shepherd-theme-arrows.css" /> | |
</head> | |
<body> | |
<div id="a">Div A</div> | |
<div id="b">Div B</div> | |
<script type="text/javascript" src="tour.js"></script> <!-- Must be after any HTML or JS referenced in it --> | |
</body> | |
</html> |
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 tour; | |
tour = new Shepherd.Tour({ | |
defaults: { | |
classes: 'shepherd-theme-arrows' | |
} | |
}); | |
tour.addStep('any-name', { | |
text: 'Example text', | |
attachTo: '#a bottom', | |
buttons: [ | |
{ | |
text: 'Next', | |
action: tour.next | |
} | |
] | |
}); | |
tour.addStep('b-step', { | |
text: 'Example 2', | |
attachTo: '#b bottom', | |
buttons: [ | |
{ | |
text: 'Finish', | |
action: tour.next | |
} | |
] | |
}); | |
tour.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment