显示或操作要在匹配元素上执行的函数队列。
用法一
jQuery.queue( element [, queueName ] ) => Array
jQuery.queue( element [, queueName ] ) => Array
说明:显示要在匹配元素上执行的函数队列。
-
添加的版本:1.3
jQuery.queue( element [, queueName ] )
注意:这是一种低级方法,您可能应该使用.queue()
反而。
例子:
显示队列的长度。
|
演示:
用法二
jQuery.queue( element, queueName, newQueue ) => Array
jQuery.queue( element, queueName, newQueue ) => Array
说明:操作要在匹配元素上执行的函数队列。
-
添加的版本:1.3
jQuery.queue( element, queueName, newQueue )
-
添加的版本:1.3
jQuery.queue( element, queueName, callback )
注意:这是一种低级方法,您可能应该使用.queue()
反而。
每个元素都可以通过 jQuery 附加一个或多个函数队列。在大多数应用程序中,只使用一个队列(称为 fx
)。队列允许在元素上异步调用一系列操作,而不会停止程序执行。
jQuery.queue()
方法允许我们直接操作这个函数队列。使用回调调用jQuery.queue()
特别有用;它允许我们在队列末尾放置一个新函数。
请注意,当使用 jQuery.queue()
添加函数时,我们应确保最终调用 jQuery.dequeue()
以便执行行中的下一个函数。
例子:
排队一个自定义函数。
|
演示:
设置一个队列数组来删除队列。
|
演示:
相关用法
- JQuery jQuery.inArray()用法及代码示例
- JQuery jQuery.when()用法及代码示例
- JQuery Mobile jQuery.mobile.path.get()用法及代码示例
- JQuery jQuery.grep()用法及代码示例
- JQuery Mobile jQuery.mobile.navigate()用法及代码示例
- JQuery Mobile jQuery.mobile.path.isRelativeUrl()用法及代码示例
- JQuery jQuery.dequeue()用法及代码示例
- JQuery jQuery.escapeSelector()用法及代码示例
- JQuery Mobile jQuery.mobile.silentScroll()用法及代码示例
- JQuery jQuery.cssNumber用法及代码示例
- JQuery jQuery.map()用法及代码示例
- JQuery jQuery.readyException()用法及代码示例
- JQuery jQuery.parseJSON()用法及代码示例
- JQuery jQuery.contains()用法及代码示例
- JQuery Mobile jQuery.mobile.path.makePathAbsolute()用法及代码示例
- JQuery jQuery.each()用法及代码示例
- JQuery jQuery.unique()用法及代码示例
- JQuery jQuery.getJSON()用法及代码示例
- JQuery jQuery.proxy()用法及代码示例
- JQuery jQuery.ajaxSetup()用法及代码示例
- JQuery jQuery.type()用法及代码示例
- JQuery jQuery.cssHooks用法及代码示例
- JQuery UI jQuery.effects.define()用法及代码示例
- JQuery jQuery.parseXML()用法及代码示例
- JQuery jQuery.support用法及代码示例
注:本文由纯净天空筛选整理自jquery.com大神的英文原创作品 jQuery.queue()。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。