Third_Degree Posted July 30, 2009 Share Posted July 30, 2009 I'm having trouble animating a size change of two divs simultaneously. Has anyone ever experienced problems with multiple setTimeouts in series? Here is my current code: while ( h < 8 ) { setTimeout( "document.getElementById(placediv).style.height = (49 - (h * 2))+'px'", 500); setTimeout( "document.getElementById(captdiv).style.height = (16 + (h * 2))+'px'", 500 ); h += 1; } all variables are defined, and when I run the execution lines without a timer, they work fine. I've also tried getting rid of the for loop, and writing all the timed changes separately but they don't work either. Any help? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.