I am trying to combine ajaxSubmit with the validate plugin
Here is my code
It says the ajaxSubmit is not a function
$("#send-reply").validate({
meta: "validate",
errorElement: "em",
errorClass: "error",
validClass: "success",
highlight: function(element, errorClass, validClass) {
$(element).closest("div.required").removeClass(validClass);
$(element).closest("div.required").addClass(errorClass);
$(element).addClass(errorClass);
},
unhighlight: function(element, errorClass, validClass) {
$(element).closest("div.required").removeClass(errorClass);
$(element).closest("div.required").addClass(validClass);
$(element).removeClass(errorClass);
},
debug:true,
rules: {
message:{required:true}
},
messages: {
message:'',
},
submitHandler: function(form) {
form.ajaxForm({ target:'#result',
success: function() {
$('#send-reply').fadeOut(500);
$('#send-reply').remove();
},clearForm: true});
}});