submit on click jquery code example
Example: jquery on form submit call function
$(document).ready(function() {
$("your form selector here").submit(function() {
// do the extra stuff here
$.ajax({
type: "POST",
url: "mail.php",
data: $(this).serialize(),
success: function() {
$('.simple-sucess').fadeIn(100).show();
$('.contact_form').fadeOut(100).hide();
$('.simple_error').fadeOut(100).hide();
}
})
})
})