Home  >  Article  >  Web Front-end  >  Example of usage of dequeue() method in jQuery_jquery

Example of usage of dequeue() method in jQuery_jquery

WBOY
WBOYOriginal
2016-05-16 16:23:541134browse

The example in this article describes the usage of the dequeue() method in jQuery. Share it with everyone for your reference. The specific analysis is as follows:

This function removes a queue function from the front of the queue and executes it.
It is recommended to learn together with the queue() function.

Grammar structure:

Copy code The code is as follows:
$(selector).dequeue(queueName)

Parameter list:

参数 描述
queueName 可选。队列的名称。
默认是 "fx",动画队列。

实例代码:

复制代码 代码如下:






dequeue()函数-脚本之家





 
 



注意:运行编辑器之后,再按F5刷新网页即可查看演示。

在以上代码中,dequeue()函数可以在执行完$(this).toggleClass("red")之后,将会从队列最前端移除$("div").animate({left:'10px', top:'30px'}, 700),也就是执行此animate动画。

希望本文所述对大家的jQuery程序设计有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn