Enable horizontal scrolling on slider #1094
-
I am confused about how to enable horizontal scrolling on the slider. If I enable "wheel", then the page will stop scrolling vertically as the mouse reaches a slider, and the slider starts scrolling horizontally. But I want to enable touch pad horizontal scrolling on the slider. So that when someone has their mouse over the slider and scrolls horizontally (like with two fingers on a Mac), the slider will scroll. But when scrolling vertically the page will scroll. Is this possible? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I am following up here if anyone knows if this is possible? |
Beta Was this translation helpful? Give feedback.
-
For anyone stumbling upon this, I solved it using the following code. The function should be passed the element to be scrollable and the Splide-instance. It could probably be solved better, but it works.
|
Beta Was this translation helpful? Give feedback.
-
I was looking for a similar solve when my client asked to enable horizontal scrolling using two-fingers via the trackpad. in this case, each slide also contains vertically scrollable content, so enabling
i was able to temporarily modify splide's source code in chrome dev tools to solve both of these which leads me to want to make a PR for the repo that adds options like in this demo i scroll left and right and the up and down: also if anyone has any thoughts for a good api syntax to support something like "disable snapping during this wheel event" i can implement it in the same PR |
Beta Was this translation helpful? Give feedback.
-
note to self: if i (or someone else) implements this as a PR, be sure to include options similar to this extension from embla: |
Beta Was this translation helpful? Give feedback.
For anyone stumbling upon this, I solved it using the following code. The function should be passed the element to be scrollable and the Splide-instance. It could probably be solved better, but it works.