jQuery Data - dequeue() Method
Example
Use dequeue() to terminate a custom queue function:
$("div").queue(function () { $(this).toggleClass("red"); $(this).dequeue(); });
Definition and Usage
The dequeue() method executes the next function in the sequence for the matched elements.
Syntax
.dequeue(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 .dequeue() is called, the next function in the sequence is removed and executed. This function will in turn (directly or indirectly) trigger a call to .dequeue(), so that the sequence can continue.