jQuery clearQueue() Method (original) (raw)
Last Updated : 18 Nov, 2022
The jQuery clearQueue() method removes all items from the queue that have not yet been run. Note that when a function has started to run, it runs until it is completed.
Syntax:
$(selector).clearQueue(name);
Here "selector" is the selected element.
Parameter: It accepts a parameter "name" which is the name of the function.
jQuery examples to show the working of clearQueue() method:
Example 1: In the below code, animation method is cleared.
HTML `
This is a paragraph.
Start Stop`
Output: