惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
大猫的无限游戏
大猫的无限游戏
Cyberwarzone
Cyberwarzone
T
Troy Hunt's Blog
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
U
Unit 42
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
F
Full Disclosure
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
IT之家
IT之家
Google Online Security Blog
Google Online Security Blog
Cloudbric
Cloudbric
月光博客
月光博客
Hacker News: Ask HN
Hacker News: Ask HN
罗磊的独立博客
N
News and Events Feed by Topic
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
Hugging Face - Blog
Hugging Face - Blog
I
Intezer
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 聂微东
P
Privacy International News Feed
有赞技术团队
有赞技术团队
博客园_首页
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
O
OpenAI News
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tor Project blog
B
Blog
量子位
T
Threatpost
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Vulnerabilities – Threatpost
酷 壳 – CoolShell
酷 壳 – CoolShell
S
SegmentFault 最新的问题
L
LangChain Blog

博客园 - dail

IE浏览器在虚拟机中无法正常显示字符 jQuery在updatepanel中使用造成内存泄露 在使用jQuery的时候不小心的内存泄漏 jQuery 1.7的隐藏改动 在javascript中实现类似asp.net webcontrol中的render的方法 jQuery 1.6的变化 jQuery ui 1.8.6 position 的一个bug 一个progressbar widget jQuery编写widget的一些窍门 jquery animate动画的特殊用法。 一个简单的widget Jquery ui widget中的_create(),_init(),destroy() Jquery ui widget开发 Jquery ui css framework jquery animate Json.net简单用法 EXTJS学习(二)Message EXTJS学习(一) jquery+linq制作博客(二)
jQuery ui effects - dail
dail · 2011-01-14 · via 博客园 - dail

jQuery ui 内置了一组effects,包括:blind,bounce,clip,drop,explode,fade,fold,highlight,pulsate,puff,scale,size,shake,slide,transfer这些效果

这些effect可以通过$("selector").effect(effect,[option],[speed],[callback]),或者是jQuery中包装的show和hide方法调用。其参数和effect调用相同。

这里说明下参数的含义:

effect:就是效果名称,可以是上面列举的effects之一。

option:在不同的effect中包含不同的option。

speed:可以是数值,单位是ms,也可以是"slow","normal", 和 "fast"。

callback:就是执行完动画后的回调函数。

下面就每个effect的option做一个说明:

blind:

  mode:值为hide/show

   direction:值为vertical/horizontal

 bounce: 

   direction: 值为up/down/left/right

  distance: 值为数值,默认为20

  times: 值为数值,默认为5

  duration:值为数值,每个弹跳的速度,默认值250ms

 clip:

  mode:值为show/hide

   direction:值为vertical/horizontal

drop

  direction: 值为left/right/top/down

  mode: 值为show/hide

  distance:值为数值。

 explode

  pieces: 值为数字,爆炸的块数。默认为9

  mode: 值为show/hide/toggle

fade

  mode: 值为show/hide

fold

  mode:值为show/hide

  size: 值为数值,折叠的大小,默认为15

  horizFirst:bool值,是否先水平方向折叠

highlight

  mode: 值为show/hide

  color: 值为颜色值,默认为#ffff99

pulsate

  mode:值为show/hide

  times:值为数值,跳动的次数

puff

  mode:值为show/hide

  percent: 值为数值,膨胀的比例,默认为150

scale

  mode:值为show/hide

  percent: 值为数值

  direction:vertical/horizontal/both

  origin:原始大小

  from: 效果开始的大小

size

  mode:值为show/hide

  restore: bool类型,默认false

  scale:vertical/horizontal/both

  origin:原始大小

  from:从一定的高度和宽度开始

  to:到一定的高度和宽度结束

shake

   mode:值为show/hide

  direction: 值为left/right/up/down,默认值left

  distance: 值为数字,默认值20

  times:值为数字

  duration:每次效果的速度

slide

  mode:值为show/hide

  direction: 值为left/right/up/down

  distance: 值为数值

transfer

  to:目标jQuery对象

  className: 需要添加的css样式名称.

jQuery ui 为我们封装了上面的一些效果,在大部分的开发中,上述的效果基本可以满足我们的需求。而不需要我们自己另行开发。此外,在jQuery ui中封装了一组easing

可以在effect中搭配easing的使用,注意easing也是上述所有effect的option中的一个option,option的名称就是easing。