function fadeOut(steps){
doFade.call(this,steps/10,1,false);
};
function fadeIn(steps){
doFade.call(this,steps/10,0,true);
};
function doFade(steps,value,action,fn){
var ie=undefined!==window.ActiveXObject,calls=arguments.callee,t=this,step;
value+=(action?1:-1)/steps,(action?value>1: value<0) && (value=action?1:0),ie===true ? t.style.filter='alpha(opacity='+value*100+')' : t.style.opacity=value;
(action?value<1:value>0) && setTimeout(function(){
calls.call(t,steps,value,action,fn);
},1000/steps);
(action?value===1:value===0 && 'undefined'!==typeof fn) && ('function'===typeof fn && fn.call(t));
}
fade方法
最新推荐文章于 2025-04-17 12:46:17 发布
1万+

被折叠的 条评论
为什么被折叠?



