diff --git a/src/privates.js b/src/privates.js index 95362ce..6329444 100644 --- a/src/privates.js +++ b/src/privates.js @@ -1131,6 +1131,22 @@ function saveCurrentStateToCookie(wizard, options, state) } } +/** + * sets a specific step object by index. + * + * @static + * @private + * @method setStep + * @param index {Integer} An integer that belongs to the position of a step + * @return {Boolean} Indicates whether the action executed + **/ +function setStep(wizard, index) +{ + var options = getOptions(wizard), + state = getState(wizard); + return paginationClick(wizard, options, state, index); +} + function startTransitionEffect(wizard, options, state, index, oldIndex, doneCallback) { var stepContents = wizard.find(".content > .body"), @@ -1240,4 +1256,4 @@ function validateArgument(argumentName, argumentValue) { throwError("The argument '{0}' is null or undefined.", argumentName); } -} \ No newline at end of file +} diff --git a/src/publics.js b/src/publics.js index 9a80050..eb031a5 100644 --- a/src/publics.js +++ b/src/publics.js @@ -155,7 +155,7 @@ $.fn.steps.remove = function (index) **/ $.fn.steps.setStep = function (index, step) { - throw new Error("Not yet implemented!"); + return setStep(this,index); }; /** @@ -168,4 +168,4 @@ $.fn.steps.setStep = function (index, step) $.fn.steps.skip = function (count) { throw new Error("Not yet implemented!"); -}; \ No newline at end of file +};