About 18,000,000 results
Open links in new tab
  1. How can I use setInterval and clearInterval? - Stack Overflow

    var handle = setInterval(drawAll, 20); // When you want to cancel it: clearInterval(handle); handle = 0; // I just do this so I know I've cleared the interval On browsers, the handle is guaranteed to …

  2. What's the difference between recursive setTimeout versus …

    Nov 23, 2019 · As the result- the browser is stuck. To prevent this behavior, the best way is to run setTimeout inside setTimeout to emulate setInterval. To correct timeouts between setTimeout …

  3. javascript - 'setInterval' vs 'setTimeout' - Stack Overflow

    What is the main difference between setInterval and setTimeout in JavaScript?

  4. javascript - How to exit from setInterval - Stack Overflow

    Nov 25, 2009 · How to exit from setInterval Asked 16 years ago Modified 3 years, 11 months ago Viewed 133k times

  5. Pass parameters in setInterval function - Stack Overflow

    Jan 19, 2009 · Please advise how to pass parameters into a function called using setInterval. My example setInterval(funca(10,3), 500); is incorrect.

  6. javascript setInterval - Stack Overflow

    Oct 27, 2014 · a question. If i use setInterval in this manner: setInterval('doSome();',60000); am i safe that the doSome() function is triggered every 60 seconds, even if I change the tab in a …

  7. Stop setInterval call in JavaScript - Stack Overflow

    Sep 8, 2020 · I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event? I want the user to be able to stop the …

  8. JavaScript setInterval and `this` solution - Stack Overflow

    3 With modern browsers the setInterval method allows additional parameters which are passed through to the function specified by func once the timer expires. Hence, a possible solution …

  9. How does setInterval and setTimeout work? - Stack Overflow

    May 29, 2017 · The browser has at least three threads: Javascript engine thread, UI thread, and timing thread, where the timing of setTimeout and setInterval are done by the timing thread. …

  10. Execute the setInterval function without delay the first time

    Jun 9, 2015 · It's there a way to configure the setInterval method of javascript to execute the method immediately and then executes with the timer