jQuery dequeue() 方法
jQuery 教程
· 2019-03-27 06:13:54
实例
从队列中移除下一个函数,然后执行函数:
$("div").queue(function(){
$("div").css("background-color","red");
$("div").dequeue();
});
$("div").css("background-color","red");
$("div").dequeue();
});
定义和用法
dequeue() 方法从队列中移除下一个函数,然后执行函数。
队列是一个或多个等待运行的函数。
dequeue() 方法通常与 queue() 方法一起使用。
一个元素可以有若干队列。大部分通常只有一个,"fx" 队列,即默认的 jQuery 队列。
注意:您应该确保 dequeue() 方法在通过 queue() 添加一个函数之后被调用,以便允许要继续的进程。
语法
$(selector).dequeue(queueName)
| 参数 | 描述 |
|---|---|
| queueName | 可选。规定队列的名称。 默认是 "fx",标准效果队列。 |
点击查看所有 jQuery 教程 文章: https://www.codercto.com/courses/l/35.html
Algorithms Unlocked
Thomas H. Cormen / The MIT Press / 2013-3-1 / USD 25.00
Have you ever wondered how your GPS can find the fastest way to your destination, selecting one route from seemingly countless possibilities in mere seconds? How your credit card account number is pro......一起来看看 《Algorithms Unlocked》 这本书的介绍吧!