Last active
November 12, 2015 21:50
-
-
Save sea-witch/0f9b3886fdeb5fdf2dc9 to your computer and use it in GitHub Desktop.
jQuery GET with promises
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.get(URI) | |
.done(function(data) { | |
console.log(data) | |
}) | |
.fail(function() { | |
console.log('Failure!') | |
}) | |
.always(function() { | |
console.log('They do it all the time. Yeah, yeah.') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment