Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added params to callbacks that contain to/from step number
  • Loading branch information
mstratman committed Oct 6, 2011
1 parent d120e93 commit f7127f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/jquery.smartWizard.js
Expand Up @@ -183,7 +183,7 @@
var curStep = steps.eq(curStepIdx);
if(stepIdx != curStepIdx){
if($.isFunction(options.onLeaveStep)) {
if(!options.onLeaveStep.call(this,$(curStep))){
if(!options.onLeaveStep.call(this,$(curStep), stepIdx+1)){
return false;
}
}
Expand Down Expand Up @@ -248,7 +248,7 @@
$(selStep, obj).attr("isDone",1);
adjustButton();
if($.isFunction(options.onShowStep)) {
if(!options.onShowStep.call(this,$(selStep))){
if(!options.onShowStep.call(this,$(selStep),$(curStep).attr('rel'))){
return false;
}
}
Expand Down Expand Up @@ -331,4 +331,4 @@
onFinish: null // triggers when Finish button is clicked
};

})(jQuery);
})(jQuery);

0 comments on commit f7127f5

Please sign in to comment.