0

hi fellas,

I set timeout for some function but within that duration if something happens i want to quit timeout and execute the function. i dont mean i need clear interval. let say settimeout will call a function 1 minute later, but about 30 seconds after i noticed that something has happened, than i want to quit the delay of function that will be called by settimeout and i want it the function be executed soon. Is there anyway?

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by DangerDev
0

i noticed that something has happened,

How will u come to know that some thing has happened? through some event right...
on that event call a function there u cancel the previous timeout using
clearTimeout()

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.