[Help]: Auto Scroll plugin interaction container #1209
-
SummaryHi first of all thanks for your carrousel and plugins it works very well great job. I want to archivée a functionality. How I could achieve that ? Any help or advice make me very happy. Thanks a lot. If applicable, which variants of Embla Carousel are relevant to this question?
Additional informationNo response CodeSandbox exampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @Cchumi, Thanks for your question. Could you please clarify - do you want the autoscroll to pause only when hovering over the left and right edges/sides of the carousel—not the whole thing? |
Beta Was this translation helpful? Give feedback.
Hi @Cchumi,
No worries—your English is totally fine, and your explanation is clear.
To get the behavior you want (pausing only when hovering over the left or right side of the carousel), here’s how you can do it:
Set
stopOnMouseEnter: false
in the Autoscroll plugin options. This will disable the default behavior of the plugin:AutoScroll Plugin Options
Add your own custom hover logic. You have two main options for detecting when to pause:
mouseenter
andmouseleave
events to those elements.mouseenter
andmousemove
events on the entire container, and calculate the mous…