Hello !
I'm new with scrollTrigger and I don't understand how I can pin elements inside my horizontal scroll section.
For example, in this codepen : I would like the scroll to stop when the number 3 (grey div) "touch" the left side of the screen.
And then the number 4 scroll above the number 3 section and the classic horizontal scroll continue.
I think it's possible, I hope, but I don't understand how to make it.
I hope my issue is clear, and someone could h
Hey @Pauline Brothier - welcome to the forums
The problem on your website is, that for the x-translation you use the scrollWidth of the container, whereas for the end of the ScrollTrigger, you use the offsetWidth - which basically means the width that the container takes space in the window. So your 'scroll-duration' here is just a window's width. You could try changing it to the scrollWidth of your container instead, see if that changes anything, and adjust it to your need