jquery-wizard
jquery-wizard copied to clipboard
"onNext" with return false does not Prevent Wizard from Continuing
Checklist
- [x] I'm using version: v0.4.3
- [x] My browser is: Chrome 56
Description
Returning false via the "onNext" does not prevent the wizard from continuing to the next item.
How can we reproduce this bug?
var wizard = $("#exampleWizardForm").wizard({
step: '.steps .step, .pearls .pearl',
templates: {
buttons: function buttons() {
var options = this.options;
return '<div class="panel-footer"><div class="wizard-buttons"><a class="btn btn-default btn-outline" href="#' + this.id + '" data-wizard="back" role="button">' + options.buttonLabels.back + '</a><a class="btn btn-primary btn-outline pull-xs-right" href="#' + this.id + '" data-wizard="next" role="button">' + options.buttonLabels.next + '</a><a class="btn btn-success btn-outline pull-xs-right" href="#' + this.id + '" data-wizard="finish" role="button">' + options.buttonLabels.finish + '</a></div></div>';
}
},
classes: {
button: {
hide: 'hidden-xs-up',
disabled: 'disabled'
}
},
onNext: function(e) {
return false;
}
});
What did you expect to happen?
The wizard should not have switched to the next section.
What happened instead?
The wizard went to the next section.
This is a must
you may use validator property, perhaps it help