PauseOnHover on nbs-flexisel-inner
Closed this issue · 3 comments
Hi,
there's any chance i could pause the animation when i hover on the .nbs-flexisel-inner element instead of .nbs-flexisel-item?
i tried tweaking around the code with setting clearinterval but didn't work well.
Edit: Forgot to mention, i want to pause it but still be able to use the arrows.
Thanks for the plugin, really easy to setup.
Hi there-- If you want to pause it but still be able to use the arrows changing the selector with the way things are currently won't have any effect because the arrows are contained inside of that .nbs-flexisel-inner container. If you look at line 149, that's where the flag gets set when the user hovers over the carousel if pauseOnHover is true. That canNavigate variable has to be true in order for the carousel to scroll by either a click or a timer event. To make things work the way you're wanting to you'd probably have to add another flag that detects a click event and execute the code in the scrollLeft and scrollRight methods if canNavigate is false due to a pause on hover.
Hey 9bitStudios, thanks for the reply.
I actually removed the condition that verifies if pauseOnHover is true or not, then tried to tweak the code inside the mouseenter/mouseleave. It kinda worked, but i couldn't make it stop looping/overlaping the animation.
Cool, thanks, i'm going to try tweaking the code later as you mentioned.
Cheers!
Closing issue assumed to be inactive. Reopen if necessary...