Jump to content
Search Community

Pinned section inside scrolling with scrollsmoother

babis test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

I noticed a few problems: 

  1. 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

     

  2. 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

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...