I\'ve written this simple Carousel. At the moment I\'m using setInterval to run my nextSlide function at certain intervals. I want to defer the timer from running when a user cl
You can save the return value of setInterval in a variable to refer to it later - that way you can cancel it if you need to, or restart it.
setInterval
See this MDC article for more details.
The basics are:
intervalID = setInterval(flashText, 1000); //do something... clearInterval(intervalID);