jQuery delay() 方法

jQuery 教程 · 2019-03-27 05:56:45

实例

对不同的 <div> 元素设置延迟:

$("button").click(function(){
    $("#div1").delay("slow").fadeIn();
    $("#div2").delay("fast").fadeIn();
});

定义和用法

delay() 方法对队列中的下一项的执行设置延迟。

语法

$(selector).delay(speed,queueName)

参数 描述
speed 可选。规定延迟的速度。

可能的值:

  • 毫秒
  • "slow"
  • "fast"
queueName 可选。规定队列的名称。

默认是 "fx",标准效果队列。

点击查看所有 jQuery 教程 文章: https://www.codercto.com/courses/l/35.html

查看所有标签

Web Standards Creativity

Web Standards Creativity

Andy Budd、Dan Rubin、Jeff Croft、Cameron Adams、Ethan Marcotte、Andy Clarke、Ian Lloyd、Mark Boulton、Rob Weychert、Simon Collison、Derek Featherstone / friends of ED / March 19, 2007 / $49.99

Book Description * Be inspired by 10 web design lessons from 10 of the world's best web designers * Get creative with cutting-edge XHTML, CSS, and DOM scripting techniques * Learn breathtakin......一起来看看 《Web Standards Creativity》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具