Simple question here that I can\'t seem to find an answer for: Once a setTimeout is set, is there any way to see if it\'s still, well, set?
setTimeout
if (
There is no need to check for an existing timer, just execute clearTimeout before starting the timer.
clearTimeout
var timer; //.. var startTimer = function() { clearTimeout(timer); timer = setTimeout(DoThis, 6000); }
This will clear any timer before starting a new instance.