|
256 | 256 | }
|
257 | 257 | },
|
258 | 258 |
|
259 |
| - _animate : function(oldStep, newStep, stepShownCallback){ |
| 259 | + _animate : function(oldStep, newStep, stepToShowCallback, stepShownCallback){ |
260 | 260 | this._disableNavigation();
|
261 | 261 | var old = this.steps.filter("#" + oldStep);
|
262 | 262 | var current = this.steps.filter("#" + newStep);
|
263 | 263 | old.find(":input").not(".wizard-ignore").attr("disabled","disabled");
|
264 | 264 | current.find(":input").not(".wizard-ignore").removeAttr("disabled");
|
265 | 265 | var wizard = this;
|
266 | 266 | old.animate(wizard.options.outAnimation, wizard.options.outDuration, wizard.options.easing, function(){
|
| 267 | + stepToShowCallback.apply(wizard); |
267 | 268 | current.animate(wizard.options.inAnimation, wizard.options.inDuration, wizard.options.easing, function(){
|
268 | 269 | if(wizard.options.focusFirstInput)
|
269 | 270 | current.find(":input:first").focus();
|
|
330 | 331 | this._checkIflastStep(step);
|
331 | 332 | this.currentStep = step;
|
332 | 333 | var stepShownCallback = function(){if(triggerStepShown)$(this.element).trigger('step_shown', $.extend({"isBackNavigation" : backwards},this._state()));};
|
333 |
| - this._animate(this.previousStep, step, stepShownCallback); |
| 334 | + var stepToShowCallback = function(){if(triggerStepShown)$(this.element).trigger('step_to_show', $.extend({"isBackNavigation" : backwards},this._state()));}; |
| 335 | + this._animate(this.previousStep, step, stepToShowCallback, stepShownCallback); |
334 | 336 | };
|
335 | 337 |
|
336 | 338 |
|
|
0 commit comments