Can't get YUI animations to wait until the first has finished
Posted
by Andy Cairns
on Stack Overflow
See other posts from Stack Overflow
or by Andy Cairns
Published on 2010-05-30T14:29:53Z
Indexed on
2010/05/30
14:32 UTC
Read the original article
Hit count: 337
Hi there,
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 immediately). 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
© Stack Overflow or respective owner