Created
December 16, 2014 09:04
-
-
Save terrymun/df63b13461297fdb87fd to your computer and use it in GitHub Desktop.
Better $.ajax() requests — listening to successful response
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
var ajaxCall = $.ajax({ | |
context: $(element), | |
data: someData, | |
dataType: 'json', | |
url: '/path/to/script' | |
}); | |
ajaxCall.done(function(data) { | |
console.log(data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment