Skip to content

Instantly share code, notes, and snippets.

@trof808
Last active December 20, 2016 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trof808/575397f27be38cf9daf9ed39c6365e40 to your computer and use it in GitHub Desktop.
Save trof808/575397f27be38cf9daf9ed39c6365e40 to your computer and use it in GitHub Desktop.
E-mail Ajax Send
//E-mail Ajax Send
$("form").submit(function() { //Change
var th = $(this);
$.ajax({
type: "POST",
url: "mail.php", //Change
data: th.serialize()
}).done(function() {
alert("Thank you!");
setTimeout(function() {
// Done Functions
th.trigger("reset");
}, 1000);
});
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment