Home/Jquery/clearqueue() Effect in Jquery

clearqueue() Effect in Jquery


The Jquery clearQueue() method removes all queued items from the queue that have not yet been executed. When the .clearQueue() method is executed then all functions on the queue that have not been executed are removed from the queue. If there is no argument then the clearQueue() will remove all the remaining functions.


$(selector).clearQueue( queueName)

queueNameIt contain the name of the queue. Defaults it will be fx.



Clicking on “Start Animation”” button, the “divBox” start with animations and stop the execution after calling the clearqueue() function. From the below output, ” divBox.animate({ width: 300 }, 1500);divBox.animate({ height: 100 }, 1500);divBox.animate({ width: 100 }, 1500);”  animation steps has cleared from the queue after clicking the “stop animation” button while executing “divBox.slideDown(2000);”.


Leave a Reply