Skip to content

Commit 55b29e4

Browse files
author
Albin Kauffmann
committed
Add a setCurrentIndex(Integer) method
1 parent d41a105 commit 55b29e4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/publics.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,18 @@ $.fn.steps.skip = function (count)
187187
{
188188
throw new Error("Not yet implemented!");
189189
};
190+
191+
/**
192+
* Sets the current step index.
193+
*
194+
* @method setCurrentIndex
195+
* @param index {Integer} The new step index (zero-based)
196+
* @return {Boolean} Indicates whether the action executed
197+
**/
198+
$.fn.steps.setCurrentIndex = function (index)
199+
{
200+
var options = getOptions(this),
201+
state = getState(this);
202+
203+
return goToStep(this, options, state, index);
204+
};

0 commit comments

Comments
 (0)