.clearQueue( [queueName ] )Returns: jQuery
Description: Remove from the queue all items that have not yet been run.
-
version added: 1.4.clearQueue( [queueName ] )
-
queueNameType: StringA string containing the name of the queue. Defaults to
fx
, the standard effects queue.
-
When the .clearQueue()
method is called, all functions on the queue that have not been executed are removed from the queue. When used without an argument, .clearQueue()
removes the remaining functions from fx
, the standard effects queue. In this way it is similar to .stop(true)
. However, while the .stop()
method is meant to be used only with animations, .clearQueue()
can also be used to remove any function that has been added to a generic jQuery queue with the .queue()
method.
Example:
Empty the queue.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
|