How to pause a setTimeout call ?

Posted by Pablo on Stack Overflow See other posts from Stack Overflow or by Pablo
Published on 2010-04-12T22:59:28Z Indexed on 2010/04/12 23:03 UTC
Read the original article Hit count: 503

Filed under:
|
|

Im using jQuery and working on a notification system for my site. The notifications automatically fadeout using the setTimeout function.

How can i stop the timer of the setTimeout call?

For example i would like to pause the setTimeout call while the mouse is over the notification and continue the count down mouseout...

I googled "pause setTimeout" with no luck.

Im currently clearing the setTimeout call with clearTimeout and at same time fading out the notification on mouseout but it would be nice to have that pause effect.

Any ideas?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery