简体   繁体   English

在 jquery 中等效的 mootools “fx.styles” 和 “addevent”

[英]mootools “fx.styles” and “addevent” equivalent in jquery

having a lot of trouble finding the equivalent of this code 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);
});

I think it would become:我认为它会变成:

$(div).animate( {left: 500, top: 500}, 200, 'linear');
tt_has(true);

There is no 'start' event in jquery animations (they start automatically), so we call tt_has(true) right after the call to .animate() , jquery 动画中没有“开始”事件(它们自动开始),所以我们在调用 .animate() 之后立即调用tt_has(true) .animate()

More info here .更多信息在这里

Hope this helps.希望这可以帮助。 Cheers干杯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM