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

推荐订阅源

WordPress大学
WordPress大学
O
OpenAI News
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
C
Check Point Blog
Vercel News
Vercel News
小众软件
小众软件
The Register - Security
The Register - Security
N
News and Events Feed by Topic
腾讯CDC
S
SegmentFault 最新的问题
H
Heimdal Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
S
Secure Thoughts
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Schneier on Security
Schneier on Security
G
GRAHAM CLULEY
云风的 BLOG
云风的 BLOG
S
Schneier on Security
J
Java Code Geeks
L
LINUX DO - 最新话题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy & Cybersecurity Law Blog
Forbes - Security
Forbes - Security
Cisco Talos Blog
Cisco Talos Blog
L
LINUX DO - 热门话题
Scott Helme
Scott Helme
爱范儿
爱范儿
GbyAI
GbyAI
Simon Willison's Weblog
Simon Willison's Weblog
L
Lohrmann on Cybersecurity
Cloudbric
Cloudbric
W
WeLiveSecurity
The Hacker News
The Hacker News
V
V2EX
Last Week in AI
Last Week in AI
Hacker News: Ask HN
Hacker News: Ask HN
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Blog — PlanetScale
Blog — PlanetScale
Cyberwarzone
Cyberwarzone
Google Online Security Blog
Google Online Security Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
S
Security @ Cisco Blogs
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security
U
Unit 42
Webroot Blog
Webroot Blog
Martin Fowler
Martin Fowler
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed

博客园 - everx

CruiseControl.net - 找到的一些文档。分享出来 【摘抄】回归测试(Regression Test) 那就来说说ASP.NET MVC中的Routing吧 ASP.NET MVC - View ASP.NET MVC - Controller(part Ⅱ) ASP.NET MVC - Controller(part Ⅰ) ASP.NET MVC - Model 学一下ASP.NET MVC C# 3.0的新特性 jQuery学习笔记(八) jQuery 学习笔记(七) SilverLight学习之路(四) Silverlight学习之路(三) - everx - 博客园 JQuery学习笔记(六) JQuery学习笔记(五) 初次使用log4net Silverlight学习之路(二) 播下silverlight的种子 JQuery学习笔记(三)
JQuery学习笔记(四)
everx · 2008-02-22 · via 博客园 - everx

五、动画效果

1、不使用动画效果显示和隐藏元素
主要是使用show()和hide()两个方法来实现
需要注意两点
a. JQuery主要是将display设置为none来隐藏元素的,即使包装集中的某一项已经是hide状态,它也会作为返回包装集中的内

容被返回
b. 如果显示设置了display为none,那在使用show方式时,回将display设置为block,反之,则会根据情况进行设置block或

inline

toggle()方法可以变换显示状态

2、使用动画效果显示和隐藏元素
hide(speed,callback)
speed    可以是毫秒或者预定义的slow, normal, fast
callback    当动画完成时调用的回调函数,没有参数,但是this代表运行动画的对象(元素)

show(speed,callback)
toggle(speed,callback)

3、其他的内置效果

fadeIn()     渐变进入
fadeOut()    渐变淡出
fadeOut(speed,callback)
fadeIn(speed,callback)
fadeTo(speed,opacity,callback)        opacity指定其透明度,值范围是0.0-1.0
slideDown(speed,callback)
slideUp(speed,callback)
slideToggle(speed,callback)
stop()

4、定制化自己的动画

animate(properties,duration,easing,callback)
animate(properties,options)

properties    JS对象类型,用于描述属性最后所要达到的值。除了设置数字值外,还可以设置字符值hide, show, or
toggle
duration    类似于之前的speed
easing   
callback    类似于之前的callback
options   

举个例子:
$('.animateMe').each(function(){
$(this).animate(
{
width: $(this).width() * 2,
height: $(this).height() * 2
},
2000
);
});