麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 開發 > JS > 正文

用Javascript做flash做的事..才完成的一個類.Auntion Action var 0.1

2024-09-06 12:43:18
字體:
來源:轉載
供稿:網友
請注意example2.html 在firefox下效果沒有在ie下圓潤,其原因來源于兼容性.

以及觸發動作過快會導致每一個li遞增兩次到三次的情況,這個原因跟類(Action.js)本身無關.原因來源于example2.html中的演示代碼.
目前正在極力修改中.
咨詢改版升級信息請關注 我的blog
http://auntion.blogbus.com
或者加我QQ詢問:82874972
action.js
代碼如下:
/*
*

效果類

By Auntion

QQ:82874972

Blog:[email protected]

Email:[email protected]

版權沒有,隨便使用.

使用時請勿刪除此部分注釋.謝謝!

*
*/


ShowHide = Class.create();ShowHide.prototype = {status: expRs={},initialize: function(ob,endW,endH,effect,step){this.element=(typeof(ob)=='object') ? ob : $id(ob);if(expRs[ob.id]==null){ expRs[ob.id] = true; }if(expRs[ob.id]){this.width=this.element.offsetWidth;this.height=this.element.offsetHeight;this.endW=(endW != null)?endW.isZero():null;this.endH=(endH != null) ? endH.isZero():null;this.effect=(effect!=null)?effect:0;this.step=(step!=null)?step:0.075;this.now=[0,0];this.tryBug=this.step;this.method,this.goTo;expRs[this.element.id]=false;this.start();}},start: function(){switch(this.effect){case 0:{var method = this.judgment();this.base(method);}break;case 1:{var method = this.judgment();this.alpha(method);}break;default:{alert("錯誤: 不是一個可用的效果! 應為0和1,默認執行0");var method = this.judgment();this.base(method);}}},base: function(method){this.element.style.overflow = "hidden";this.goTo = this.create(method);},alpha: function(method,step,Opacity){alert("未完成的效果,自動用默認效果替代.");this.goTo = this.base(method);},allIs: function(){this.now[0] += this.expressions(0,this.endW,this.now[0],this.step);this.now[1] += this.expressions(0,this.endH,this.now[1],this.step);if((this.width > this.endW) ? (this.now[0] > (this.endW+this.tryBug)) : (this.now[0] < (this.endW-this.tryBug))){this.element.style.width = this.now[0]+"px";}if((this.height > this.endH)? (this.now[1] > (this.endH+this.tryBug)) : (this.now[1] < (this.endH-this.tryBug))){this.element.style.height= this.now[1]+"px";}else{clearInterval(this.goTo);this.element.style.width = (this.now[0]+this.tryBug)+"px";this.element.style.height= (this.now[1]+this.tryBug)+"px";expRs[this.element.id] = true;}},widthIs: function(){this.now += this.expressions(0,this.endW,this.now,this.step);if((this.width > this.endW) ? (this.now > (this.endW+this.tryBug)) : (this.now < (this.endW-this.tryBug))){this.element.style.width = this.now+"px";}else{clearInterval(this.goTo);this.element.style.width = (this.now+this.tryBug)+"px";expRs[this.element.id] = true;}},heightIs: function(){this.now += this.expressions(0,this.endH,this.now,this.step);if((this.height > this.endH) ? (this.now > (this.endH+this.tryBug)) : (this.now < (this.endH-this.tryBug))){this.element.style.height = this.now+"px";}else{clearInterval(this.goTo);this.element.style.height = (this.now+this.tryBug)+"px";expRs[this.element.id] = true;}},judgment: function(){if(this.endW != null && this.endH !=null){this.method = "all";this.now = [this.width,this.height];}else if(this.endW != null && this.endH == null){this.method = "width";this.now = this.width;}else if(this.endW == null && this.endH != null){this.method = "height";this.now = this.height;    }return this.method;},create: function(codeString){var ShowHideGoTo;switch(codeString){case "all" : ShowHideGoTo = setInterval(function(){this.allIs();}.bind(this),1);break;    case "width" : ShowHideGoTo = setInterval(function(){this.widthIs();}.bind(this),1);break;case "height": ShowHideGoTo = setInterval(function(){this.heightIs();}.bind(this),1);break;}return ShowHideGoTo;},expressions: function(num,end,now,step){var exec;switch(num){    case 0 : exec = (end - now)*step;break;            default : exec = (end - now)*step;break;}return exec;}};
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 视频一区二区中文字幕 | 欧美成人小视频 | 成人视屏网站 | 少妇的肉体2无删减版 | 欧美三级短视频 | 国产女同疯狂激烈互摸 | 极品一级片 | 天堂二区| 国产精品久久久久久久娇妻 | 国产免费专区 | 国产91免费看 | 黄色片视频观看 | 欧洲色阁中文字幕 | 在线观看国产免费视频 | 在线看毛片的网站 | 国产精品剧情一区二区三区 | 国产精品久久久麻豆 | 亚洲成人福利网站 | 看中国一级毛片 | 91经典视频| av电影免费播放 | 成人国产视频在线观看 | 亚洲一区二区在线视频 | 国产精品久久久久久久久久东京 | 亚州综合图片 | 色人阁五月天 | lutube成人福利在线观看污 | 男男羞羞视频网站国产 | 国产一区二区欧美精品 | 久久手机在线视频 | 国产午夜精品一区二区三区视频 | 国产午夜精品一区二区三区免费 | 国产电影精品久久 | 91成| 国产精品免费久久久久久 | 国产一级免费不卡 | 久久不射电影 | 国产精品入口夜色视频大尺度 | 99亚洲国产精品 | 久草成人在线 | 久久综合久久美利坚合众国 |