Jump to content
Search Community

Scrolltrigger (pin section issues)

digitalfrci test
Moderator Tag

Recommended Posts

Hello @digitalfrci

 

It sure is possible, but you would have to wrap all the content that could be visible at any point and pin that wrapper instead.

 

See the Pen yLveMJm by akapowl (@akapowl) on CodePen

 

 

 

Also, if you are going to have ScrollTriggers on other elements within that wrapper, you would then have to set the pinnedContainer property on those subsequent ScrollTriggers to have their positions be calculated where you'd expect them to be. I hope that will help - happy scrolling!

 

pinnedContainer Element | String - If your ScrollTrigger's trigger/endTrigger element is INSIDE an element that gets pinned by another ScrollTrigger (pretty uncommon), that would cause the start/end positions to be thrown off by however long that pin lasts, so you can set the pinnedContainer to that parent/container element to have ScrollTrigger calculate those offsets accordingly. Again, this is very rarely needed. (added in 3.7.0)

 

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