I'm using Parsley.js 2.0.0 and am trying to use it along with the Malsup jQuery form plugin. What I can't figure out is how to combine the two so that Parsley runs the validation first, then if true, proceeds to submit the form.
I see the "beforeSubmit" option with Form, but can't figure out how to add in Parsley.
My code at the moment is:
$(document).ready(function() {
$('#contactus').ajaxForm({
target: '#statusResetResponse',
success: function () {
$.gritter.add({
title: "title",
text: "text here",
time: '2000'
});
return false;
}
});
});
Thanks in advance for any suggestions.