Jump to content
Search Community

ScrollTrigger not scrolling pinned content

mrsam test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Im current pinning a container on top of the viewport.

This container contains a lot of text (exceeding) the viewport height.

 

What I want to do is being able to scroll the content to the end while it's pinned.

 

But for some reason content (visible on the right column in the codePen) isn't scrolling - any suggestions on achieving this?

 

let tl = gsap.timeline({
  scrollTrigger: {
    trigger: ".list",
    scrub: 1,
    end: "100%",
    markers: true,
    pin: true,
    toggleClass: "is-sticky"
  }
});

See the Pen podLZPe by mrsgs (@mrsgs) on CodePen

Link to comment
Share on other sites

  • 2 weeks later...
On 2/21/2022 at 5:54 AM, GreenSock said:

That's because you pinned that whole container. If you want that to scroll, you probably shouldn't pin it :)

 

Is this more like what you're looking for?: 

 

 

Doh! You're totally correct and your updated example is perfect! Cheers Jack!

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