简体   繁体   中英

mootools “fx.styles” and “addevent” equivalent in jquery

having a lot of trouble finding the equivalent of this code in 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() ,

More info here .

Hope this helps. Cheers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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