Perform Function At Timed Intervals

0
0

Perform a function every one second:

function myFunction() {
   // do something
}

var int = setInterval(myFunction, 1000);

Cancel it:

clearInterval(int);

Pass variables when calling custom function:

setInterval(function(){ doMove(panelWidth, tooFar); }, delayLength);
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.