Permalink
Browse files

Added params to callbacks that contain to/from step number

  • Loading branch information...
1 parent d120e93 commit f7127f5792e7f4ec9d3520463138dce222cf92d1 @mstratman committed Oct 6, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 js/jquery.smartWizard.js
View
6 js/jquery.smartWizard.js
@@ -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;
}
}
@@ -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;
}
}
@@ -331,4 +331,4 @@
onFinish: null // triggers when Finish button is clicked
};
-})(jQuery);
+})(jQuery);

0 comments on commit f7127f5

Please sign in to comment.