Skip to content

Commit 039b637

Browse files
committed
Now it's time to use the proper promise API. *facepalm*
1 parent 1dfac8f commit 039b637

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

js/contact_me.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ $(function() {
88
submitSuccess: function($form, event) {
99
event.preventDefault(); // prevent default submit behaviour
1010
$.post($form.attr("action"), $form.serialize())
11-
.then(function() {
11+
.done(function() {
1212
// Success message
1313
$('#success').html("<div class='alert alert-success'>");
1414
$('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")
@@ -21,7 +21,7 @@ $(function() {
2121
//clear all fields
2222
$('#contactForm').trigger("reset");
2323
})
24-
.catch(function() {
24+
.fail(function() {
2525
// Fail message
2626
$('#success').html("<div class='alert alert-danger'>");
2727
$('#success > .alert-danger').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")

0 commit comments

Comments
 (0)