Skip to content

Instantly share code, notes, and snippets.

@makenowjust
Created August 28, 2016 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makenowjust/51015ae01a38a5b010cec7f8aff3b0ae to your computer and use it in GitHub Desktop.
Save makenowjust/51015ae01a38a5b010cec7f8aff3b0ae to your computer and use it in GitHub Desktop.
function () {
var dfd1 = $.Deferred();
var dfd2 = $.Deferred();
var dfd3 = $.Deferred();
setTimeout(function(){
console.log("d1-1");
dfd1.resolve();
},2000);
setTimeout(function(){
console.log("d1-2");
dfd2.resolve();
},10000);
setTimeout(function(){
console.log("d1-3");
dfd3.resolve();
},4000);
return $.when(dfd1, dfd2, dfd3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment