Description:

The jquery queue() method shows the queue of functions to be executed on the matched/selected elements. A queue is one or more functions waiting to run and it hasย several queues. Most often it has only one, the “fx” queue, which is the default jQuery queue.ย 

For Better Understand:ย 

It is anย array of functions stored on a per element basis, using jQuery.data(). They work as First-In-First-Out.ย To understand better, weย have to understand how jQuery does animation. If you write multiple animate method calls one after the other, jQuery creates an internal queue and adds these method calls to it. Then it runs those animate calls one by one.

Syntax

$(selector).queue(queueName)

queueNameย  Optional. Specifies the name of the queueย Default is “fx”, the standard effects queue

Example:

Output:

On Click ofย “Click to start animation” button, the “divpanelBox” started to append (css stlyle) the new height & width for the same and started to increasing the size of the div as shown below.

jquery-queue-effects-dotnet-helpers-com-thiyagu

Example:

Output:

jquery-queue-effects-dotnet-helpers-com-thiyagu

Note :

After we build up our queue items, we have to call dequeue() on the queue in order to kick off the series of sequential events.deQueue() method . we need to use dequeue() method with queue() elseย the queue will not be closed and you will get undesired result.