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? Link to comment https://forums.phpfreaks.com/topic/168062-solved-series-of-settimeouts/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.