Using the jQuery Ajax request method you can post the email data to a script (submit.php). Using the success
callback option to animate elements after the script is executed.
note - I would suggest utilizing the ajax Response Object to make sure the script executed successfully.
$(function() {
$('.submit').click(function() {
$.ajax({
type: 'POST',
url: 'submit.php',
data: 'password=p4ssw0rt',
error: function()
{
alert("Request Failed");
},
success: function(response)
{
//EXECUTE ANIMATION HERE
} // this was missing
});
return false;
});
})