Validate Plugin with serialize()
I can't figure out why this code is not working.. The data does not serialize so it sends no data.. Everything else works fine but that.. Could somebody help rearrange the code to make it proper? I'm using the Validation Plugin..
- if ($('#contact_form').length) {
$('#contact_form').validate({
errorPlacement: function(error, element){},
submitHandler: function(form){
$('#replace_wrap').html('<p>Processing...</p>');
$.ajax({
type: 'POST',
url: 'ajax/process.php',
data: $('#contact_form').serialize(),
success: function(msg){
$('#replace_wrap').html('<h1>' + msg + '</h1>');
}
});
}
});
}