{"name":"dequeue","type":"method","title":".dequeue()","deprecated":null,"removed":null,"desc":"Execute the next function on the queue for the matched elements.","categories":["effects/custom-effects","data","utilities","version/1.2"],"entries":[{"return":"jQuery","signatures":{"added":"1.2","argument":{"desc":"A string containing the name of the queue. Defaults to fx, the standard effects queue.","name":"queueName","optional":"true","type":"String"}},"examples":{"desc":"Use dequeue to end a custom queue function which allows the queue to keep going.","code":"\n$( \"button\" ).click(function() {\n $( \"div\" )\n .animate({ left:\"+=200px\" }, 2000 )\n .animate({ top:\"0px\" }, 600 )\n .queue(function() {\n $( this ).toggleClass( \"red\" ).dequeue();\n })\n .animate({ left:\"10px\", top:\"30px\" }, 700 );\n});\n","css":"\n div {\n margin: 3px;\n width: 50px;\n position: absolute;\n height: 50px;\n left: 10px;\n top: 30px;\n background-color: yellow;\n }\n div.red {\n background-color: red;\n }\n","html":"\n\n
When .dequeue() is called, the next function on the queue is removed from the queue, and then executed. This function should in turn (directly or indirectly) cause .dequeue() to be called, so that the sequence can continue.