Reputation:
I can't seem to figure out how to get my Ajax form to only submit when the jQuery validation function has taken place. Here is my code...
This is the validation plugin I'm using, http://bassistance.de/jquery-plugins/jquery-plugin-validation/
Upvotes: 0
Views: 293
Reputation: 1977
This code:
$("#contactForm").validate({
submitHandler: function(form) {
console.log("Call Login Action");
}
});
should be inside $(document).ready(function() {
. Worked for me.
Upvotes: 1