Latest web development tutorials

jQuery queue () method

jQuery Effect Methods jQuery Effect Methods

Examples

Display <span> element in the queue length:

$("span").text(div.queue().length);

try it"

Definition and Usage

queue () method to display queue function is to be performed on the selected element.

Queue waiting to run one or more functions.

queue () method usually dequeue () used with the method.

An element may have several queues. Most usually only one, "fx" queue, the queue default jQuery.


grammar

$(selector).queue(queueName)

参数 描述
queueName 可选。规定队列的名称。

默认是 "fx",标准效果队列。



Examples

Try - Example

The method used with queues
How the queue (), dequeue () and clearQueue () used together.

Calculation of the queue length + circular queue
How to calculate the length of the queue + circular queue.


jQuery Effect Methods jQuery Effect Methods