看板 [ Ajax ]
討論串[討論] Settimeout的運作?
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者JYHuang (夏天到了,冷不起來了說)時間17年前 (2008/04/30 11:00), 編輯資訊
0
0
0
內容預覽:
==略==. 這樣是可行的.... 後來我追了一下moofx的code... 原來他是有用到prototype的 bind功能. 加入prototype.js後. 改成這樣就可以跑了... if (this.now > 0). setTimeout(this.small.bind(this),10)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者ClareQ (人比人Cheese人)時間17年前 (2008/04/30 03:02), 編輯資訊
0
0
0
內容預覽:
small: function(){. var size=this.now,. style=this.el.style,. smaller=function(){. style.width=[size-=10,'px'].join('');. if(size>0)setTimeout(smaller

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者JYHuang (夏天到了,冷不起來了說)時間17年前 (2008/04/30 02:25), 編輯資訊
0
0
0
內容預覽:
剛剛自己在寫個元件的smooth 縮放~. small: function(){. this.now = this.now - 10;. this.el.style.width = this.now+"px";. if (this.now > 0). setTimeout(this.small(),
首頁
上一頁
1
下一頁
尾頁