Last active
June 12, 2017 21:23
-
-
Save seriiserii825/ec5b96ae9fa9a6e918d5470077306eb0 to your computer and use it in GitHub Desktop.
form-ajax
This file contains 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
$(".forms").submit(function() { | |
$.ajax({ | |
type: "POST", | |
url: "mail.php", | |
data: $(this).serialize() | |
}).done(function() { | |
alert("Спасибо за заявку! Скоро мы с вами свяжемся."); | |
setTimeout(function(){ | |
$(".form").trigger("reset"); | |
}); | |
}); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment