jQuery Data - clearQueue() Method
Definition and Usage
The clearQueue() method removes all items that have not yet been run from the sequence.
Syntax
.clearQueue(queueName)
Parameters | Description |
---|---|
queueName | Optional. A string value that contains the name of the sequence. The default is fx, the standard effect sequence. |
Detailed Description
When the .clearQueue() method is called, all functions that have not been executed in the sequence are removed from the sequence. If no parameter is used, .clearQueue() removes the remaining functions from the fx (standard effect sequence). In this way, it is similar to .stop(true). However, the .stop() method is only used for animations, while .clearQueue() can also be used to remove any functions added to the general jQuery sequence through the .queue() method.