Is there a way to clear all JavaScript timers at once?

Posted by Jens on Stack Overflow See other posts from Stack Overflow or by Jens
Published on 2009-12-13T15:53:42Z Indexed on 2011/02/18 23:25 UTC
Read the original article Hit count: 234

Filed under:
|
|

Im building an automatic refreshing comment section for my website using jQuery .load. So I am using a javascript 'setTimeout' timer to check for new comments.

But after doing some stuff like changing comment pages or deleting (all using ajax), a few old timers keep running, even though I used clearTimeout before loading new ajax content.

Is there some way to clear ALL javascript timers when I load new ajax content?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery