jQuery effects dequeue () method
Examples
The next function is removed from the queue, and then execute the function:
$("div").queue(function(){
$("div").css("background-color","red");
$("div").dequeue();
});
$("div").css("background-color","red");
$("div").dequeue();
});
try it"
Definition and Usage
dequeue () method to remove a function from the next queue, and then execute the function.
Queue waiting to run one or more functions.
dequeue () method usually queue () used with the method.
An element may have several queues. Most usually only one, "fx" queue, the queue default jQuery.
Note: You should ensure that dequeue () method is called after adding a function via queue (), to allow the process to continue.
grammar
$(selector).dequeue(queueName)
参数 | 描述 |
---|---|
queueName | 可选。规定队列的名称。 默认是 "fx",标准效果队列。 |
Try - Example
The method used with queues
How the queue (), dequeue () and clearQueue () used together.