Can somebody help me fix this animation using GSAP ScrollTrigger?

22 Replies
clevermissfox
clevermissfox•4w ago
What is your goal ? 'fix' it doesnt tell us much. how would you like it to behave?
i_lost_to_loba_kreygasm
the pinnedContainer shouldnt overlap and stay in its position and the images should go upwards when scrolling
i_lost_to_loba_kreygasm
BTS22_admin
BTS
BTS Bioengineering | Motion Capture Systems for Sport & Healthcare
Capturing human body movement since 1986. We connect the world of healthcare and sport with cutting-edge motion capture technologies.
i_lost_to_loba_kreygasm
go to this section below and you will see what I mean
No description
clevermissfox
clevermissfox•4w ago
I shut down the computer for the night bit either someone else will be along to help or I will take a look at it tmrw. But to speed up the process what is the pinnedContainer in reference to? I see no class or ID or Javascript variable with that name. You also seem to have several scroll triggers with various starts and ends. Additionally just for future reference you don't have to bring in the script tags for gsap on codepen , you can add the library feom the settings on your project!
No description
i_lost_to_loba_kreygasm
the pinnedContainer is the container that holds all images and it needs to stay pinned until we the see the end image
clevermissfox
clevermissfox•4w ago
The element with the class of .image-container ? You could probably accomplish it with position sticky without gsap, is gsap a requirement/ necessity? You have so so many gsap markers, why ?
clevermissfox
clevermissfox•4w ago
On mobile so can't do a whole lot but here's a simplified start https://codepen.io/Miss-Fox/pen/JoPyvKx
i_lost_to_loba_kreygasm
yes i wanna learn gsap , so i would prefer gsap and your solution only works if the scroll is in the container '
clevermissfox
clevermissfox•4w ago
That doesn't answer my question 😆 Like I said , it's a start as I'm on mobile. Will leave it here for the night And nope it scrolls even of I'm outside the container when going down
i_lost_to_loba_kreygasm
thank you for your effort 🙂
clevermissfox
clevermissfox•4w ago
i_lost_to_loba_kreygasm
I woonder why you made another container doesnt work for me 😦 i think it works on mobile because of screen size
clevermissfox
clevermissfox•4w ago
To be able to use sticky positioning and overflow hidden as well as overflow scroll
i_lost_to_loba_kreygasm
I would be happy if you can do with gsap 😦 anybody else can help me ?
clevermissfox
clevermissfox•4w ago
As i said, i was able to take a look at it today and try to remember how to use gsap. i think this is what you wanted. i would recommend building it again yourself from scratch (at least the JS part) since you said you wanted to learn gsap. https://codepen.io/Miss-Fox/pen/JoPyvKx?editors=1010
i_lost_to_loba_kreygasm
thank you so much but doesnt the white space around looks bad ?
clevermissfox
clevermissfox•4w ago
That's how your example was, as well as you said you wanted it pinned, you didnt want to use position sticky, you wanted to learn GSAP. I dont have any more time to work tweaking this, was hoping this can get you started and give you a base to learn gsap as that was your goal. You're welcome to make another post amd see if someone else will build it brick by brick but more beneficial would be to dive into the GSAP docs to configure it exactly how you want it.
ScrollTrigger | GSAP | Docs & Learning
ScrollTrigger enables anyone to create jaw-dropping scroll-based animations with minimal code. Infinitely flexible. Scrub, pin, snap, or just trigger anything scroll-related, even if it has nothing to do with animation.
i_lost_to_loba_kreygasm
I did create my own pen
clevermissfox
clevermissfox•4w ago
I will be deleting it in the next couple days so be sure to fork it if you need anything off it
i_lost_to_loba_kreygasm
i used timeline and and removed the scroller as I didnt want extra markup

Did you find this page helpful?