$(".moving_container").mouseenter(
function(){
clearInterval(timer);
}
).mouseleave(function(){
timer = getInterval(slideWidth,slideHeight,slideLength)
});
I'm currently working on developing a slider and I want it to pause when the cursor is over the slider and then resume when the cursor moves away. However, the functionality seems to be glitchy.
To replicate the issue: Resize the screen and hover your mouse over the slider Then move the cursor out of the slider
Here's another demo for reference
Any tips on how I can properly clear the interval would be greatly appreciated!