Web development by Gabriele Romanato

Post navigation

jQuery: deferred objects and animations

The jQuery's deferred objects, introduced in jQuery 1.5, allow us to concatenate synchronous and asynchronous actions in a chain of actions. They can be applied to animations in order to avoid nested functions, thus increasing code readability and maintainance.

The traditional approach

In the traditional approach to animations, we use nested callback functions to create sequential animations: