Skip to content

Commit 7442e07

Browse files
authored
support of setStep method
support to setStep method to navigate to a specific step dynamically
1 parent d22aaf0 commit 7442e07

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/privates.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -309,22 +309,6 @@ function getStep(wizard, index)
309309
return steps[index];
310310
}
311311

312-
/**
313-
* sets a specific step object by index.
314-
*
315-
* @static
316-
* @private
317-
* @method setStep
318-
* @param index {Integer} An integer that belongs to the position of a step
319-
* @return {Boolean} Indicates whether the action executed
320-
**/
321-
function setStep(wizard, index)
322-
{
323-
var options = getOptions(wizard),
324-
state = getState(wizard);
325-
return paginationClick(wizard, options, state, index);
326-
}
327-
328312
/**
329313
* Gets or creates if not exist an unique id from the given wizard instance.
330314
*
@@ -1147,6 +1131,22 @@ function saveCurrentStateToCookie(wizard, options, state)
11471131
}
11481132
}
11491133

1134+
/**
1135+
* sets a specific step object by index.
1136+
*
1137+
* @static
1138+
* @private
1139+
* @method setStep
1140+
* @param index {Integer} An integer that belongs to the position of a step
1141+
* @return {Boolean} Indicates whether the action executed
1142+
**/
1143+
function setStep(wizard, index)
1144+
{
1145+
var options = getOptions(wizard),
1146+
state = getState(wizard);
1147+
return paginationClick(wizard, options, state, index);
1148+
}
1149+
11501150
function startTransitionEffect(wizard, options, state, index, oldIndex, doneCallback)
11511151
{
11521152
var stepContents = wizard.find(".content > .body"),

0 commit comments

Comments
 (0)