Skip to content

Instantly share code, notes, and snippets.

@sshkarupa
Last active August 29, 2015 14:17
Show Gist options
  • Save sshkarupa/0d929d9078391fca8d8a to your computer and use it in GitHub Desktop.
Save sshkarupa/0d929d9078391fca8d8a to your computer and use it in GitHub Desktop.
ajax submit form
//Аякс отправка форм
//Документация: http://api.jquery.com/jquery.ajax/
$("#form").submit(function(e) {
e.preventDefault;
$.ajax({
type: "POST",
url: "mail.php",
data: $(this).serialize()
}).done(function() {
alert("Спасибо за заявку!");
setTimeout(function() {
}, 1000);
});
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment