Effect dequeue() Method - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:dequeue


The dequeue() method removes and executes the next effect from the queue.


Parameter Require Description Value
queueName Optional. name of the queue Default is "fx", the standard effects queue

The following code shows how to Remove the next function from the queue, and then execute the function:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
        var div = $("div");
        div.animate({height: 300}, "slow");
        div.animate({width: 300}, "slow");
        div.queue(function () {
            div.css("background-color", "red");
        });/*from   w w w.j  a  va2  s  .c o m*/
        div.animate({height: 100}, "slow");
        div.animate({width: 100}, "slow");

<p><button id="start">Start Animation</button></p>

<div style="background:blue;height:100px;width:100px;">



Related Tutorials