Created
January 20, 2015 01:24
-
-
Save sshine/fe5ddf9c3763583e0c10 to your computer and use it in GitHub Desktop.
I miss monads...
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
$.ajax({ url: "foo.csv", dataType: "text" }) | |
.done(function(data) { | |
fetchPostTags(data); | |
$.ajax({ url: "bar.csv", dataType: "text" }) | |
.done(fetchPostsComments); | |
.fail(function(failure) { | |
updateStatus("Failed to load posts-comments.csv"); | |
console.log(failure); | |
}); | |
}) | |
.fail(function(failure) { | |
updateStatus("Failed to load posts-tags.csv"); | |
console.log(failure); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment