
Wasn't that fun?
Here are a few caveats to keep in mind:
- The fake-scrolling animation (just the part that's moving the container horizontally) must have no
easing (
ease: "none"
). - Pinning and snapping won't work on ScrollTriggers with a
containerAnimation
. - The mapping of scroll position trigger points are based on the trigger element itself not being
animated
horizontally (inside the container). If you need to animate the trigger, you can either wrap it in a
<div> and use that as the trigger instead or just factor the trigger's movement into your end
position. For example, if you animate it left 100px, make the
end
100px further to the left. - Requires ScrollTrigger 3.8.0 or later