From 6dfe3c89f8c4d8a3c2b3124c52033039d416228a Mon Sep 17 00:00:00 2001 From: meh-cfl Date: Sun, 20 Jan 2013 10:10:51 +0000 Subject: [PATCH] if the button is disabled then don't perform its click action if it isn't an input. --- js/jquery.form.wizard.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/jquery.form.wizard.js b/js/jquery.form.wizard.js index 38a36dc..efddf77 100644 --- a/js/jquery.form.wizard.js +++ b/js/jquery.form.wizard.js @@ -146,6 +146,10 @@ }, _next : function(){ + if(this.nextButton.attr('disabled')){ + return false; + } + if(this.options.validationEnabled){ if(!this.element.valid()){ this.element.validate().focusInvalid(); @@ -190,6 +194,10 @@ _back : function(){ if(this.activatedSteps.length > 0){ + if(this.backButton.attr('disabled')){ + return false; + } + if(this.options.historyEnabled){ this._updateHistory(this.activatedSteps[this.activatedSteps.length - 2]); }else{