I’ve got this piece of code in my jquery validation script:
resetForm: function() {
if ( $.fn.resetForm )
$( this.currentForm ).resetForm();
this.submitted = {};
this.prepareForm();
this.hideErrors();
this.elements().removeClass( this.settings.errorClass );
}
this is exactly what I need, thus I would like to use it. I’ve tried to bind it with an onclick, absent success. I just need a button/link that calls this function. Can you advice me on this?
If you try this, it should work (assuming you have a button with an id myButton and a form called myForm):