YUI 动画在活动结束后?
有没有办法在动画完成后触发事件? 这样做的理由是什么? 我对 YUI 库非常陌生,我迷路了..
我现在的情况是
var anim = new Y.Anim({
node: node,
duration: 1.0,
easing: Y.Easing.easeOut
});
……等等
注意:这适用于 YUI2。
There is a way to trigger an event after an animation is done?
what's the cose for it?
I'm very new with YUI libraries and i'm getting lost..
my cose now is
var anim = new Y.Anim({
node: node,
duration: 1.0,
easing: Y.Easing.easeOut
});
...etc
Note: This applies to YUI2.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的!类似于:
请参阅 http://developer.yahoo.com/yui/examples/animation /index.html 了解更多示例。
Yup! Something like:
See http://developer.yahoo.com/yui/examples/animation/index.html for more examples.
要在动画完成后执行某些操作,您只需监听“end”事件:
To do something after an animation is done, you just need to listen to the "end" event:
这个想法是,由于动画需要时间,因此您可能希望在动画完成时收到通知,以执行您可能需要的任何其他逻辑: 以下是该事件的一些用途:
The idea is, that since an animation takes time, you might want to be notified when the animation completes to perform any additional logic you might need: Here are a few uses for that event: