Live step-by-step website presentation / introducton tool.
Prezenter.js is jquery.js and jquery.tranzit.js dependent so make sure these libraries are included in your page.
...
<link href="css/prezenter.css" rel="stylesheet" />
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.tranzit.js" type="text/javascript"></script>
<script src="js/prezenterData.js" type="text/javascript"></script>
<script src="js/prezenter.min.js" type="text/javascript"></script>
...
$(document).ready(function() {
new Prezenter();
});autoStartifalwaysthe presentation will auto open each time after page reload, ifonceit will auto open only after first page load; defaultfalse,animationdefines the animation type on a highlighted element: available:pulse,flash,shake,swing,tada; defaultpulse,loopif set to true, goes back to the begining after the last step; defaultfalse,controlsOffsetshifts the controls position to the left or right; in pixels,moveSpeedspeed of the arrow animation in milliseconds; default800,showTexttext appearing on a hidden controls box, defaultpresentation.
onStartexecuted when presentation starts,onEachStepexecuted when a step ends; returns a current step number,onEndexecuted when the whole presentation ends.
$(document).ready(function() {
(new Prezenter({
autoStart: true,
animation: 'flash',
loop: false,
controlsOffset: 0,
moveSpeed: 800,
introText: "This is a live step-by-step presentation of our website.<br>You can move backwards and forwards using left and right arrow keys.",
outroText: 'This is the end of the presentation.<br>You can watch it again by clicking the tab with a question mark at the top of the page.',
onStart: function() {
console.log('start');
},
onEachStep: function(step) {
console.log(step);
},
onEnd: function() {
console.log('prezentation end');
}
}));
});The file contains definitions for each step of the presentation
selector: jquery selector pointing to a dom element within the page,text: message shown in the prezentator tooltip; may contain html tags
positionposition of the tooltip (left,right,top,bottom); default (if not explicitly specified)left,scrolladditionnal top scroll,widthandheightelement frame custom width & height,stepIncalback executed when a step animation ends, returns the tooltip, element frame and arrow cursor as dom objects,stepOutcallback executed while moving to a following step, returns the tooltip, element frame and arrow cursor as dom objects.
An example of prezenterData.js file
The main script is written in coffeesctipt. You can find it in the dev directory, together with scss files.
For tooltip animation I used css snippets from the animate.css library. If you wish to include more fancy animations check out the library source code : Animate.css
- chrome 27
- firefox 19.0.2
- Opera 12.15
- custom pull down text - controls box
- stepOut callback on each step added
- added onEnd and onLastSteps callbacks
- added custom height & width of the element frame
- autoStart option with
alwaysandonce
- custom callback on a specific step returns tip, frame and cursor dom objects
- Initial commit