$(“#form”).validate({
submitHandler: function(form) {
// some other code
// maybe disabling submit button
// then:
//$(form).submit();
//$(“#submit”).click(function(){
dataString = $(“#form”).serialize();
$.ajax({
type: “POST”,
url: “includes/post.file.php”,
data: dataString,
dataType: “json”,
success: function(data) {
$(“#sent_message”).html(“<div class=’success-box’>Thank you! </div>”);
$(‘#submit’).attr(“disabled”, true)
//alert(data);
}
});
return true;
//});
}
});