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

后端 未结 4 1781
夕颜
夕颜 2020-12-28 15:30

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

4条回答
  •  既然无缘
    2020-12-28 16:26

    You may want to consider using jQuery Timers instead, which abstracts away many of the "ugly" details of setTimeout / setInterval, and makes them easier to use in your code for things like what you are describing.

提交回复
热议问题