Recently I was working on an image slider that I had auto-rotating by using setInterval and clearInterval. The problem I came across was that when a user clicks to show another slider image, the counter variable wasn’t resetting. For example, if image 3 was showing, and the user clicked image […]