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?
setInterval(fname, 10000);
I want the us
I guess the following code will help:
var refreshIntervalId = setInterval(fname, 10000); clearInterval(refreshIntervalId);
You did the code 100% correct... So... What's the problem? Or it's a tutorial...