jQuery .delay()
.delay()
.delay( duration [, queueName ] )Returns: jQuery
Description: Set a timer to delay execution of subsequent items in the queue.
version added: 1.4.delay( duration [, queueName ] )
Added to jQuery in version 1.4, the .delay() method allows us to delay the execution of functions that follow it in the queue. It can be used with the standard effects queue or with a custom queue. Only subsequent events in a queue are delayed; for example this will not delay the no-arguments forms of .show() or .hide() which do not use the effects queue.
Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectively.
Using the standard effects queue, we can, for example, set an 800-millisecond delay between the .slideUp() and .fadeIn() of <div id="foo">:
$( "#foo" ).slideUp( 300 ).delay( 800 ).fadeIn( 400 );
When this statement is executed, the element slides up for 300 milliseconds and then pauses for 800 milliseconds before fading in for 400 milliseconds.
The .delay() method is best for delaying between queued jQuery effects. Because it is limited—it doesn't, for example, offer a way to cancel the delay—.delay() is not a replacement for JavaScript's native setTimeout function, which may be more appropriate for certain use cases.
jQuery .delay()的更多相关文章
- jquery delay()介绍及使用指南
.delay()是用来在jQuery动画效果和类似队列中是最好的.但是,由于其本身的限制,比如无法取消延时——.delay(),它不是JavaScript的原生 setTimeout函数的替代品,这可 ...
- jQuery delay() 方法
定义和用法 delay() 方法对队列中的下一项的执行设置延迟. 语法 $(selector).delay(speed,queueName) 参数 描述 speed 可选.规定延迟的速度. 可能的值: ...
- JQuery Delay Hover效果
CSS代码 .tbui_aside_float_bar { position: fixed; left: 50%; bottom: 120px; margin-left: 608px; border- ...
- 深入理解JS异步编程五(脚本异步加载)
异步脚本加载 阻塞性脚本 JavaScript在浏览器中被解析和执行时具有阻塞的特性,也就是说,当JavaScript代码执行时,页面的解析.渲染以及其他资源的下载都要停下来等待脚本执行完毕 浏览器是 ...
- Angular源代码学习笔记-原创
时间:2014年12月15日 14:15:10 /** * @license AngularJS v1.3.0-beta.15 * (c) 2010-2014 Google, Inc. http:// ...
- JS页面延迟执行一些方法(整理)
一般在JS页面延迟执行一些方法.可以使用以下的方法 jQuery.delay()方法简介 http://shawphy.com/2010/11/jquery-delay.html jQuery中que ...
- Angularjs 源码
/** * @license AngularJS v1.3.0-beta.15 * (c) 2010-2014 Google, Inc. http://angularjs.org function t ...
- 使用jquery的delay方式模拟sleep
javascript中并没有原生sleep函数可供调用,一般来说为了实现sleep功能,大都是采用SetTimeout来模拟,以下片段采用jquery的delay方法来模拟,也算是提供了另外一个视角吧 ...
- jQuery学习之路(4)- 动画
▓▓▓▓▓▓ 大致介绍 通过jQuery中基本的动画方法,能够轻松地为网页添加非常精彩的视觉效果,给用户一种全新的体验 ▓▓▓▓▓▓ jQuery中的动画 ▓▓▓▓▓▓ show()和hide()方法 ...
随机推荐
- nginx相关知识点
1.nginx -V 可以查看nginx的安装目录等目录信息 2.nginx -v 查看版本 3.路径 /usr/local/etc/nginx/nginx.conf (配置文件路径) /usr/lo ...
- This application has no explicit mapping for /error, so you are seeing this as a fallback.
检查url是否输入正确,要加上之前的mapping映射
- echarts is not defined解决方案
最近在写一个类似于vue的一种cola-ui框架,有兴趣的朋友可以了解一下:http://legacy.cola-ui.com/: 项目中有个业务需要引入Echarts图表的需求,由于是前后端没有分离 ...
- Elasticsearch 7.4.0官方文档操作
官方文档地址 https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html 1.0.0 设置Elasticsea ...
- oracle重置dba用户密码
1.进入sqlplus里面: [oracle@master ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Tue ...
- 内存不足导致mysql关闭,CentOS6.5增加swap分区
某日发现mysql自动关闭了,查找错误日志发现以下错误 2017-07-14 13:07:30 5494 [Note] InnoDB: Initializing buffer pool, size = ...
- 用ant打包
Eclipse 内置了 Ant . Ant 是一种类似于批处理程序的软件包,它主要繁琐的工作是编写和调试自动处理脚本(一个 XML 文件),但只要有了这个脚本,我们就可以一键完成所有的设定工作. 本节 ...
- nginx反向代理实现后端web的读写分离
1.环境 角色 ip 主机名 负载均衡节点 10.0.0.11 nginx-lb01 可读写web01节点 10.0.0.12 nginx-web01 只读web02节点 10.0.0.13 ngin ...
- linux 静态路由
用ip route删除默认路由 ip route del default via 192.168.18.1 用route删除默认路由route del default gw 192.168.18.1 ...
- Zookeeper包中,slf4j-log4j12和log4j冲突问题解决
程序启动时会有日志警告 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/E ...