Marty Trujillo

jQuery Deferred Object

The purpose of this page is to experiment with the deferred object. Buttons 1-5 are deferred. Button 1 is deferred by 1 second; Button 5 is deferred by 5 seconds; and Button 0 is not deferred.

Notice that the non-defered button takes 6 seconds to alert, but hides immediately. While button 5 takes 5 seconds to alert and doesn't hide until the alert is complete. That's the general idea.