Search
 
SCRIPT & CODE EXAMPLE
 

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

       }
    })

  })
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: reload a child component in angular 
Javascript :: read xlsx file in angular 5 
Javascript :: javascript hash string 
Javascript :: .textcontent in javascript 
Javascript :: delete element in hash in javascript 
Javascript :: add numbers in array 
Javascript :: elasticsearch aggregation unique values 
Javascript :: javascript encode base64 
Javascript :: buffer in javascript 
Javascript :: conditional array element js 
Javascript :: promisify 
Javascript :: close div when click outside angular 7 
Javascript :: iframe reload src 
Javascript :: js parse json 
Javascript :: ajax get method in jquery 
Javascript :: kendo template multiselect default selected 
Javascript :: js send file as form input 
Javascript :: print random string from an array to screen in javascript 
Javascript :: string to jspn js 
Javascript :: force click btn using jquery 
Javascript :: adding styling to element using javascript 
Javascript :: appending an element to another element javascript 
Javascript :: react script 
Javascript :: How to get current time zone in javascript 
Javascript :: jquery body remove class 
Javascript :: fabric download 
Javascript :: nvm check version available to download 
Javascript :: js array includes 
Javascript :: install vue by CDN 
Javascript :: Immediately-Invoked Function javascript 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =