I have a problem with setinterval. It is probably best to show an example, here is the link:
http://boudaki.com/testing/carouselTest
I basically have problems creating this work, as if I needed it. When the page loads, the contents rotate every three seconds, as well as the number buttons on the right, too. when you click on the button, the buttons expand and the animation stops - all is well. Then, when you click the small close button at the bottom of the buttons, the animation resumes - everything is fine ... but then when you click on the numbered buttons again, the animation continues to move. Why?
There is quite a bit of code here, but setIntervals and clear intervals:
- line 69: on document.ready run the animation off -assign timerId for global var
- line 87: When the user clicks on the numbered clearinterval button in this animation
- line 102: when the user presses the close button, start the animation again
What is it .... I just donβt understand why this does not stop the animation a second time ??? Can anyone understand why?
Any ideas?
source share