Skip to content

Instantly share code, notes, and snippets.

@jkup
Created April 24, 2015 18:02
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 jkup/892a5dbac6ac00627a95 to your computer and use it in GitHub Desktop.
Save jkup/892a5dbac6ac00627a95 to your computer and use it in GitHub Desktop.
Why would you do this?
(function() {
var foo = new $.Deferred();
function bar() {
doSomething();
foo.resolve();
}
$.when(foo).then(function() {
doSomethingElse();
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment