0
function doAnimation(element, stuff){           
    setTimeout(animate(element, stuff), 1000);              
    }

function animate(element, stuff) {
}

Is there a simple solution to my problem? I have looked all over the place but cannot find what I am looking for.

1 Answers1

3

Try this,

function doAnimation(element, stuff){           
  setTimeout(function () { animate(element, stuff) }, 1000);              
}

function animate(element, stuff) {
}
Oleksandr T.
  • 76,493
  • 17
  • 173
  • 144