Hi,
I try to use an horizontal scroll. I use smooth-scrollbar.js and gsap/scrollTrigger. It's very cool.
I would like the horizontal scroll only for min-width > 1024px, and vertical scroll for max-width = 1024px
And i would like to switch horizontal<=>vertical on resize.
I use window.matchMedia
But that doesn't work on resize.
from small window to wide window = the vertical scroll turns into a horizontal scroll.
from wide window to small window = the horizontal scroll does not turn into a vertical scroll.
I try to kill the scrollTrigger but not not sure that it is really essential.
How can I switch horizontal to vertical and vertical to horizontal, on resize, please ?