A little dab'll do ya
Code Snippets
Perform Function At Timed Intervals
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);