This commit is contained in:
Marc 2015-12-24 20:14:05 -05:00
parent d504440371
commit 2f95dc2a35

View file

@ -8,15 +8,13 @@ $contactForm.submit(function(e) {
data: $(this).serialize(),
dataType: 'json',
beforeSend: function() {
$contactForm.append('<div class="alert alert--loading">Sending message…</div>');
console.log("Sending.");
},
success: function(data) {
$contactForm.find('.alert--loading').hide();
$contactForm.append('<div class="alert alert--success">Message sent!</div>');
console.log("Sent.");
},
error: function(err) {
$contactForm.find('.alert--loading').hide();
$contactForm.append('<div class="alert alert--error">Ops, there was an error.</div>');
console.log("Failed.");
}
});
});