Created
          July 20, 2015 20:24 
        
      - 
      
- 
        Save danyliak/1a781baade0e41b83c9b to your computer and use it in GitHub Desktop. 
    Аякс отправка форм
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | //Аякс отправка форм | |
| //Документация: http://api.jquery.com/jquery.ajax/ | |
| $("#main_form").submit(function() { | |
| $.ajax({ | |
| type: "POST", | |
| url: "mail.php", | |
| data: $(this).serialize() | |
| }).done(function() { | |
| alert("Спасибо за заявку!"); | |
| setTimeout(function() { | |
| $("#form").trigger("reset"); | |
| console.log("jjj"); | |
| }, 1000); | |
| }); | |
| return false; | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment