淡入
fadeIn([speed, [easing], [fn]])
speed
:速度("slow"
,"normal"
,"fast"
)或者毫秒数值1000
easing
:切换效果"swing"
:慢快慢,默认"linear"
:匀速
fn
:回调函数,在动画完成时执行的函数,每个元素执行一次$().fadeIn();
淡出
fadeOut([speed, [easing], [fn]])
speed
:速度("slow"
,"normal"
,"fast"
)或者毫秒数值1000
easing
:切换效果"swing"
:慢快慢,默认"linear"
:匀速
fn
:回调函数,在动画完成时执行的函数,每个元素执行一次$().fadeOut();
淡入淡出切换
fadeToggle([speed, [easing], [fn]])
speed
:速度("slow"
,"normal"
,"fast"
)或者毫秒数值1000
easing
:切换效果"swing"
:慢快慢,默认"linear"
:匀速
fn
:回调函数,在动画完成时执行的函数,每个元素执行一次$().fadeToggle();
调节透明度
fadeToggle(speed, opacity, [easing], [fn])
speed
:速度("slow"
,"normal"
,"fast"
)或者毫秒数值1000
,必须写opacity
:透明度,必须写[0, 1]
之间easing
:切换效果"swing"
:慢快慢,默认"linear"
:匀速
fn
:回调函数,在动画完成时执行的函数,每个元素执行一次$().fadeTo(1000, 0.5);