Home >Web Front-end >Front-end Q&A >What is the usage of jquery queue
The jquery queue method displays the function queue to be executed on the selected element. Its usage syntax is "$(selector).queue(queueName)", and the parameter queueName specifies the name of the queue.
The operating environment of this article: windows7 system, jquery version 3.2.1, DELL G3 computer
What is the usage of jquery queue?
jquery queue() method displays the function queue to be executed on the selected element.
A queue is one or more functions waiting to be run.
queue() method is usually used together with dequeue() method.
An element can have several queues. Most usually have just one, "fx" queue, which is the default jQuery queue.
Syntax
$(selector).queue(queueName)
Parameters
queueName Optional. Specifies the name of the queue.
The default is "fx", the standard effects queue. . j
Example
Add and remove the attribute named "color":
$("button").click(function(){ var $x = $("div"); $x.prop("color","FF0000"); $x.append("The color 属性: " + $x.prop("color")); $x.removeProp("color"); });
Recommended learning: "jquery video tutorial"
The above is the detailed content of What is the usage of jquery queue. For more information, please follow other related articles on the PHP Chinese website!