Created
January 11, 2013 22:03
-
-
Save akumpf/4514327 to your computer and use it in GitHub Desktop.
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
$.getJSON('/data0.json', function(data) { | |
console.log("yay! Data0 is ready!"); | |
// ok, now use that to get the next piece of data. | |
$.getJSON('/data1.json', function(data) { | |
console.log("yay! Data1 is ready!"); | |
// ok, now use that to get the next piece of data. | |
$.getJSON('/data2.json', function(data) { | |
console.log("yay! Data2 is ready!"); | |
// ok, now use that to get the next piece of data. | |
$.getJSON('/data3.json', function(data) { | |
console.log("yay! Data3 is ready!"); | |
// ok, now use that to get the next piece of data. | |
$.getJSON('/data4.json', function(data) { | |
console.log("yay! Data4 is ready!"); | |
// Whew... we have all 5 pieces of data. | |
console.log("all done."); | |
}); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment