Created
July 20, 2015 20:24
-
-
Save danyliak/1a781baade0e41b83c9b to your computer and use it in GitHub Desktop.
Revisions
-
danyliak created this gist
Jul 20, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ //Аякс отправка форм //Документация: 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; });