繁体   English   中英

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

[英]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.

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