O'Reilly logo

Pro jQuery 2.0, Second Edition by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 36

image

Using Deferred Objects

Throughout this book, you have seen examples that relied on callbacks – you provide a function that is executed when something occurs. A good example is the way events are handled, using a method such as click, passing in a function as an argument. The code statements in the function are not performed until the user triggers the event – until that point our function is dormant.

Deferred objects is the jQuery term for a set of enhancements to the way callbacks are used. When using deferred objects, callbacks can be used in any situation and not just for events; and they provide a lot of options and control over ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required