jquery onclick form submit code example
Example 1: when a form is subbmited jquery
$("#myform").submit(function(e) {
})
Example 2: 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();
}
})
})
})