jQuery API | jQuery API 中英文对照版 - jQuery在线查询手册 |
fadeTo(speed, opacity, callback) |
fadeTo(speed,opacity,callback)
把所有匹配元素的不透明度以渐进方式调整到指定的不透明度,并在动画完成后可选地触发一个回调函数。 这个动画只调整元素的不透明度,也就是说所有匹配的元素的高度和宽度不会发生变化。 返回值:jQuery 参数:
示例: $("p").fadeTo("slow", 0.5); 示例: $("p").fadeTo("slow", 0.5, function(){ alert("Animation Done."); }); Fade the opacity of all matched elements to a specified opacity and firing an optional callback after completion. Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them. Return value: jQuery
Example: $("p").fadeTo("slow", 0.5); Example: $("p").fadeTo("slow", 0.5, function(){ alert("Animation Done."); }); |