babis Posted February 11, 2023 Share Posted February 11, 2023 Hi guys, how can i make the left side(the scrollable), more controllable and slow. At this time as soon as the section is pinned, i lose control of the scrolling, so i find it difficult for example to go to the first itinerary or the very top of content in general See the Pen vYjxVQY?editors=1010 by babistsour (@babistsour) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted February 11, 2023 Solution Share Posted February 11, 2023 I noticed a few problems: Your "end" value of your ScrollTrigger is "bottom top" which means when the bottom of that trigger element would normally hit the top of the viewport. So since your start is "top top" that basically means the entire pinned animation will only last as long as the height of the trigger element which isn't very much. You could make the distance from the start to the end match the height of your fake-scrolling content. Like: end: () => "+=" + document.querySelector(".how__right-content").offsetHeight Your tween is using the default ease ("power1.out"), but I assume you want it to have a consistent speed, so ease: "none" is appropriate. Is this better? See the Pen QWBevXX?editors=1010 by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now