Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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();

       }
    })

  })
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #form #submit #call #function
ADD COMMENT
Topic
Name
7+4 =