jQuery queue()Method
Examples
Display the length of the queue in a <span> element:
$("span").text(div.queue().length);
Try it Yourself »
Definition and Usage
The queue() method displays the queue of functions to be executed on the selected elements.
A queue is one or more functions waiting to run.
The queue() method is usually used withdequeue()the method together.
An element can have several queues. Most often only one, the "fx" queue, the default jQuery queue.
Syntax
$(selector).queue(queueName)
| Parameters | Description |
|---|---|
| queueName | Optional. Specifies the name of the queue. Default is "fx", the standard effects queue. |
Try it Yourself - Examples
Use queue-related methods together
How to use queue(), dequeue() and clearQueue() together.
Calculate queue length + loop queue
How to calculate the length of the queue + loop the queue.
Other Extensions
jQuery Effects Methods