/******************* 开发制作,jason.leung qq,147430218 该插件仅供学习参考使用 *******************/ function myevent(obj,ev,fn){ if (obj.attachevent){ obj.attachevent('on'+ev,fn); }else{ obj.addeventlistener(ev,fn,false); }; }; function getbyclass(obj,sclass){ var array = []; var elements = obj.getelementsbytagname('*'); for (var i=0; i= sh-_this.box.offsetheight){ speed *= -0.8; t = sh-_this.box.offsetheight; }; if (math.abs(speed)<2)speed = 0; if (speed == 0 && sh-_this.box.offsetheight == t){ clearinterval(timer); _this.fn(); }; _this.box.style.top = t + 'px'; }, 30); }; }, fn : function(){ var _this = this; var timer = settimeout(function(){ _this.box.style.display = 'none'; }, 1000); }, };