Jump to content
Search Community

ScrollTrigger - The pinned child element goes beyond its parent

Masha555 test
Moderator Tag

Recommended Posts

Hi @Masha555

 

As you can see your end trigger (the one you've given top+=100px) has not met it's end trigger, so it will keep pinning until it has met the end trigger you've set.

 

If I understand your question correctly, you want when the section is done that the element stops pinning, so you will have to put the end trigger at the bottom of your block variable and the end trigger needs to be the bottom of the trigger (not the footer). 

 

I've modified your HTML and JS to get to the desired result. Hope it helps and happy tweening! 

 

See the Pen KKJNoEB?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

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