$jQuery(document).ready(function($){
$jQuery(document).ready(function($){
$("#contact_form").validate({
rules: {
name: "required",
email: {
required: true,
email: true
},
message: "required"
},
messages: {
name: "Please enter your name",
email: {
required: "Please enter your email adress",
email: "Please enter your valid email adress"
},
message: "Please enter a short message, what your inquiry is about"
},
submitHandler: function(form) {
$('#loading_icon').show();
$('#click').hide();
var params = $(form).serialize();
$.ajax ({
type: 'POST',
url: '<?php echo admin_url( 'admin-ajax.php' ); ?>',
data: params,
success: function(response) {
$('#response').hide();
$('#response').html(response);
$('#response').fadeIn('slow');
$('#loading_icon').hide();
}
});
}
});
});