Latest web development tutorials

jQuery clearQueue () method

jQuery Effect Methods jQuery Effect Methods

Examples

Stop the queue remaining functions:

$("button").click(function(){
$("div").clearQueue();
});

try it"

Definition and Usage

clearQueue () method to remove all items from the queue is not already running. Note that when the function starts running, it will always run to completion.

Related methods:

  • Queue () - Demo queued functions
  • dequeue () - remove a function from the next queue, and then execute the function

Tip: stop () method (for animation) The difference is, clearQueue () method to remove any queued functions.


grammar

$(selector).clearQueue(queueName)

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

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


Examples

Try - Example

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


jQuery Effect Methods jQuery Effect Methods