I am using this plugin http://code.google.com/p/bvalidator/
$('#vendorDetailsForm').bValidator();
if ( $('#vendorDetailsForm').data('bValidator').isValid() ) {
$("#addVendorsTabs").tabs('select', 4);
}
The above logic is bind to a button that is nested inside vendorDetailsForm element, but i want to disable the submit action upon validation is successfull, and instead navigate to tab in index 4.
Currently it navigate to index 4, but then it submit the form!
Is there a way to do that?
jQuery’s preventDefault is your best option, so it works more consistently across browsers.