I don't understand what is wrong with my code here. I am making a slideshow for my website. The only problem is when I pause it and play it again, it speeds up. For some reason, clearInterval() does not seem to be doing its job correctly.
Code:function playSlideshow() { intval = setInterval(next, time); document.getElementById('play').style.display = "none"; document.getElementById('pause').style.display = "block"; } function pauseSlideshow() { clearInterval(intval); document.getElementById('play').style.display = "block"; document.getElementById('pause').style.display = "none"; }



Reply With Quote


Bookmarks