[英]mootools “fx.styles” and “addevent” equivalent in jquery
在 jquery 中找到此代碼的等效項時遇到很多麻煩
var reveal = new Fx.Styles(div, {
duration: 200,
transition: Fx.Transitions.Quad.easeIn,
wait: true,
fps: 24
});
reveal.addEvent('onStart', function(){
tt_has(true);
});
我認為它會變成:
$(div).animate( {left: 500, top: 500}, 200, 'linear');
tt_has(true);
jquery 動畫中沒有“開始”事件(它們自動開始),所以我們在調用 .animate() 之后立即調用tt_has(true)
.animate()
,
更多信息在這里。
希望這可以幫助。 干杯
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.