I have two Divs
<div id="squareone"></div>
<div id="squaretwo"></div>
And when the page loads I want each div too ->$('#squareone').animate({top: '1px'},1000);
The question is - Is it possible to toggle between these two divs automatically when the page loads maybe with a timer or by using the setInterval function?
So when the page loads $('#squareone').animate({top: '1px'},1000);
and then 2 secs
later $('#squaretwo').animate({top: '1px'},1000);
and then repeatedly for 20 sec
?
Thanks!