Skip to content

Commit 6d66010

Browse files
committed
Add goToStep function, related to usablica#45
1 parent c666607 commit 6d66010

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

intro.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@
9393
return false;
9494
}
9595

96+
/**
97+
* Go to specific step of introduction
98+
*
99+
* @api private
100+
* @method _goToStep
101+
*/
102+
function _goToStep(step) {
103+
//because steps starts with zero
104+
this._currentStep = step - 2;
105+
if(typeof(this._introItems) !== 'undefined') {
106+
_nextStep.call(this);
107+
}
108+
}
109+
96110
/**
97111
* Go to next step on intro
98112
*
@@ -533,6 +547,10 @@
533547
_introForElement.call(this, this._targetElement);
534548
return this;
535549
},
550+
goToStep: function(step) {
551+
_goToStep.call(this, step);
552+
return this;
553+
},
536554
exit: function() {
537555
_exitIntro.call(this, this._targetElement);
538556
},

0 commit comments

Comments
 (0)