I am using jQuery steps ( https://github.com/rstaib/jquery-steps/wiki ) in order to create step by step form to users to fill out. It works great, however I need to be able to r
You can paste this:
$.fn.steps.reset = function () {
var wizard = this,
options = getOptions(this),
state = getState(this);
goToStep(wizard, options, state, 0);
for (i = 1; i < state.stepCount; i++) {
var stepAnchor = getStepAnchor(wizard, i);
stepAnchor.parent().removeClass("done")._enableAria(false);
}
};
in the jquery.steps.js file right after this code:
$.fn.steps = function (method)
{
if ($.fn.steps[method])
{
return $.fn.steps[method].apply(this, Array.prototype.slice.call(arguments, 1));
}
else if (typeof method === "object" || !method)
{
return initialize.apply(this, arguments);
}
else
{
$.error("Method " + method + " does not exist on jQuery.steps");
}
};
and call it like this wherever you want:
$('myjquerystepmodal').steps("reset");