Chapter 3. Managing Animations

Like most of the methods that jQuery makes available to us, the effect, or animation, methods can be chained together in sequence, like this:

    jQuery(elements).fadeIn().slideDown()

When several animation methods, such as fadeIn(), and so on, are chained together and called on the same element or collection of elements, they are placed into a queue to be executed one after the other in series rather than all executing simultaneously in parallel. The standard animation queue created for an animated element is called fx, although custom queues can easily be created.

jQuery gives us several methods that make working with and manipulating an element's fx queue extremely easy. These methods include:

  • clearQueue()
  • delay() ...

Get jQuery 1.4 Animation Techniques Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.