test
This commit is contained in:
parent
d504440371
commit
2f95dc2a35
1 changed files with 3 additions and 5 deletions
|
@ -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.");
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue