Wednesday, October 10, 2007


Set a delay for a specific function.

ID = window.setInterval("funcName", delay)

funcName is the name of the function for which you want to set a delay.
delay is the number of milliseconds (thousandths of a second) that the function should be delayed.
ID is the interval ID.

intervalID = window.setInterval("animalate()", 500);

The interval ID is used to refer to the specific interval when it needs to be cleared. The setInterval() function is commonly used to set a delay for functions that are executed again and again, such as animations.
blog comments powered by Disqus