Description
The .queue() method shows the queue of functions to be executed on the matched elements.
v1.2
This method has the form:
.queue(queueName)
Parameter | Description |
---|---|
queueName | (optional) Specifies the name of the queue (default: fx - the standard effects queue) |
Return Value
This form returns a Array object.
v1.2
This method has the alternate form:
.queue(queueName,newQueue)
Parameter | Description |
---|---|
queueName | (optional) Specifies the name of the queue (default: fx - the standard effects queue) |
newQueue | Specifies an array of functions to replace the current queue contents |
Return Value
This form returns a jQuery object.
v1.2
This method has the alternate form:
.queue(queueName,callback(next))
Parameter | Description |
---|---|
queueName | (optional) Specifies the name of the queue (default: fx - the standard effects queue) |
callback(next) | Specifies the new function to add to the queue, with a function to call that will dequeue the next item. |
Return Value
This form returns a jQuery object.
Examples
Queue a custom function:
$("div").queue(function() {
$(this).removeClass("color");
$(this).dequeue();
});