Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery clearQueue() method

jQuery clearQueue() method

jQuery effects methods jQuery effects methods

Example

Stop the remaining functions in the queue:

$("button").click(function(){

$("div").clearQueue();

});

Try it »


Definition and Usage

The clearQueue() method removes all items from the queue that have not yet run. Note that once a function starts running, it continues until it finishes.

Related methods:

**Tip:** Used together with stop() Unlike the method that applies only to animations, the clearQueue() method removes any queued function.


Syntax

$(

selector

).clearQueue(

queueName

)

Parameters Description
queueName Optional. Specifies the name of the queue.
 默认是 "fx",标准效果队列。 |


Try it - Example

Using queue-related methods together
How to use queue(), dequeue(), and clearQueue() together.


jQuery effects methods jQuery effects methods