jQuery.Deferred() is pretty easy
I was using an asynchronous file uploader and, for usability, wanted to make sure the upload progress bar was displayed for at least a couple seconds before changing the view. The jQuery.Deferred object made this a breeze, eliminating a bunch of callback/isDone checking mess: var uploadFinished = $.Deferred(), timerFinished = $.Deferred(); $.when(uploadFinished, timerFinished).done(function () {
[...read the post]
mrclay.
rg
song for a future generation
2