David Ansermot Web Developer / TYPO3 Integrator

3mar/100

JS – setInterval tip

You want to use the Javascript function setInterval() but you dont know how ?
Or you tried but it doesn't work ?

I think you do the thing like this :

var timerId = setInterval('myFunction', 200);

but it doesn't works.
Try like this :

var timerId = setInterval(function() { myFunction(); } , 200);

Hope this snippet helps you.
See ya !