开发者

Can't get YUI animations to wait until the first has finished

I have 3 animations that run when I load my page. A header descends from the top and a footer ascends from the bottom. Also, my main logo goes from fully transparent to fully opaque.

I'm using the YUI framework for the animations.

My problem is that they all happen at the same time. I'd like the header & footer animations to go at the same time but the logo to wait until the others have finished.

setTimeout doesn't appear to work (the animation triggers i开发者_StackOverflow社区mmediately). I've also tried a while loop to wait until the currentFrame = a certain number but my loops seem to stop everything from working.

Any help would be gratefully received.

Thanks

Andy


Have a look at this example: http://developer.yahoo.com/yui/examples/animation/anim-chaining.html

Or if you're using YUI 3: http://developer.yahoo.com/yui/3/examples/anim/anim-chaining.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜