Created
July 30, 2014 13:10
-
-
Save zapthedingbat/d32a8fb26913207aeb4d to your computer and use it in GitHub Desktop.
jquery method returns a function that returns a promise that resolves when all the promises returned by specified functions resolve/reject
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
function wait(/* functions returning promises*/) { | |
return (function() { | |
return $.when.apply($, Array.prototype.map.call(actions, function(a) { return a(); })); | |
}).bind(Array.prototype.slice.call(arguments)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment