jQuery Methods: queue()
jQuery queues are lists of functions that are waiting to be executed. These functions execute in sequence. As soon as one function is done executing, the next function is called. This is the default behavior specified in the
queue property of the options object (the second argument to the
animate() method). Each element's queue is independent. Use the
queue() method to add a new function to the queue. The function at the head of the queue is automatically dequeued and invoked. It is passed a single function argument (this executes the next function in the queue).
Here is an example of the