Skip to content

Commit 44e1d42

Browse files
ADD: option to go to a specific step
1 parent a05a911 commit 44e1d42

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

build/jquery.steps.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,6 +1467,21 @@ $.fn.steps.skip = function (count)
14671467
throw new Error("Not yet implemented!");
14681468
};
14691469

1470+
/**
1471+
* Sets the current step index.
1472+
*
1473+
* @method setCurrentIndex
1474+
* @param index {Integer} The new step index (zero-based)
1475+
* @return {Boolean} Indicates whether the action executed
1476+
**/
1477+
$.fn.steps.setCurrentIndex = function (index)
1478+
{
1479+
var options = getOptions(this),
1480+
state = getState(this);
1481+
1482+
return goToStep(this, options, state, index);
1483+
};
1484+
14701485
/**
14711486
* An enum represents the different content types of a step and their loading mechanisms.
14721487
*

0 commit comments

Comments
 (0)