I would like to delay my while loop on each iteration. I tried the following:
var o = 1;
while(o<4){
setTimeout("setupAnimation(o)",2000);
//setupAnimation(o); //<--this works but everything happens att the same time
o++;
}
I also tried to write it like this, which didn't work either:
var o = 1;
function repeatMe(){
setupAnimation(o);
o++;
setTimout('repeatMe()',1000);
}
Any suggestions?