I'm having trouble with what should be a simple Timeout and clear. Here's my code:
function test() {
var Timer = setTimeout(function() {
alert("hello");
}, 1000);
}
test();
The code runs in a slideshow, and when the slide transitions out, I clear the timeout using:
clearTimeout(Timer);
For some reason, the clear causes the slideshow navigation to hang and remain stuck on the current slide. Is there something wrong with my code? Better yet, can I do this w/o coding the Timeout as a function w/in a function? That would likely solve it.