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

推荐订阅源

I
InfoQ
D
DataBreaches.Net
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
Martin Fowler
Martin Fowler
Security Latest
Security Latest
Cisco Talos Blog
Cisco Talos Blog
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
IT之家
IT之家
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security Affairs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园_首页
L
LINUX DO - 最新话题
Know Your Adversary
Know Your Adversary
S
Schneier on Security
The Last Watchdog
The Last Watchdog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
G
GRAHAM CLULEY
Y
Y Combinator Blog
P
Palo Alto Networks Blog
L
LINUX DO - 热门话题
Hugging Face - Blog
Hugging Face - Blog
W
WeLiveSecurity
C
Cybersecurity and Infrastructure Security Agency CISA
aimingoo的专栏
aimingoo的专栏
博客园 - 司徒正美
The Register - Security
The Register - Security
T
The Exploit Database - CXSecurity.com
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
Cyberwarzone
Cyberwarzone
雷峰网
雷峰网
T
Tailwind CSS Blog
V2EX - 技术
V2EX - 技术
T
Threat Research - Cisco Blogs
S
Secure Thoughts
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
O
OpenAI News
C
Cyber Attacks, Cyber Crime and Cyber Security
The Cloudflare Blog
量子位
Apple Machine Learning Research
Apple Machine Learning Research
T
Threatpost
S
SegmentFault 最新的问题
小众软件
小众软件
Google DeepMind News
Google DeepMind News
Help Net Security
Help Net Security

博客园 - 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。