English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

jQuery effect dequeue() method

jQuery Effect Methods

The dequeue() method executes the next function on the queue for the selected element.

When calling dequeue(), the next function in the queue will be removed from the queue and then continue to execute.

Note:A queue is one or more functions waiting to be executed.

The dequeue() method is usually used withqueue()Methods used together.

Syntax:

$(selector).dequeue(queueName)

Example

Use dequeue to end a custom queue function, allowing the queue to continue::

$("button").click(function(){
  $("div")
  .animate({left:"+=200px"}, 2000)
  .animate({top:"0px"}, 600)
  .queue(function() {
    $(this).toggleClass("blue").dequeue();
  })
  .animate({left:"10px", top:"300px"}, 700);
});
Test and see‹/›

Parameter Value

ParametersDescription
queueName(Optional) Specify the queue name. The default isfxStandard effect queue

jQuery Effect Methods