Roman098765
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Roman098765
-
-
Hi, I started using GSAP recently and I like this library but I stuck for now. I want to slide elements back to right side position after having already scrolled to the next vertical section. The idea is that there is no empty space left after horizontal scroll ends. I can use this approach to prevent it:
x: () =>
-(container.scrollWidth - document.documentElement.clientWidth) + "px"
but this is not exactly what I want, because if there are not many elements and they fit into the screen, it will just stand there until I scroll to the next section.Thanks for your help 🙏.
See the Pen mdzBejp by roman1253361234 (@roman1253361234) on CodePen
Slide elements back to right side position in horizontal scroll.
in GSAP
Posted
It solves this problem in different way, but it's fine, thank you!