Home >>jQuery Tutorial >jQuery queue() Method

jQuery queue() Method

jQuery queue() Method

jQuery queue() method in jQuery is a built-in mechanism that is used to execute the specified items and displays the task list. You can execute one or more functions in the queue.


Parameter Values

Parameter Description
queueName It is optional parameter used to specifies the queue name This parameter default value is "fx", the standard effects queue
Here is an Example of jQuery queue() Method:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
var div = $("#box1");
div.animate({height: 100}, "slow");
div.animate({width: 100}, "slow");
div.animate({height: 50}, "slow");
div.animate({width: 50}, "slow");
<button class="btn1">Start</button>
<div id="box1" style="width:50px;height:50px;position:absolute;left:10px;top:50px;background-color:green;"></div>


No Sidebar ads