Jump to content
Search Community

Pin within a pin + timelines

smallio test
Moderator Tag

Recommended Posts

I've been stumped for a while here trying to pin each of these 5 grey sections when they reach the left hand side of the page (inside a bigger pin), then operate a separate timeline to effect each green box differently while each section is pinned. Does that make sense? Hopefully so :) 

 

I've isolated the demo down as much as possible. This is actually a spin off that parallax thing you did the other day Jack @GreenSock, so perhaps you'd be able to see what I'm doing wrong quicker than someone else? Currently "sec" is pinned which holds the whole segment in place on the bigger page I've isolated this from. I've tried referring to "this" section in view but then it ignores the sidescroll and does some weird diagonal stuff.  

Thank's in advance if anyone can help! 

See the Pen ExELGBj by tmwilly (@tmwilly) on CodePen

Link to comment
Share on other sites

You can't pin stuff inside a containerAnimation, sorry. That limitation is mentioned in the docs.

 

The only way to do something like that is with some very customized, complicated code that'd basically counter-animate the pinned stuff in the other direction (to make it seem like it's staying put while its container is moving). It'd likely be a substantial amount of work and may be fraught with potential "gotchas". You may want to either change your design or hire an expert who could tackle the complex setup (sounds expensive). 

  • Like 1
Link to comment
Share on other sites

5 hours ago, GreenSock said:

You can't pin stuff inside a containerAnimation, sorry. That limitation is mentioned in the docs.

 

The only way to do something like that is with some very customized, complicated code that'd basically counter-animate the pinned stuff in the other direction (to make it seem like it's staying put while its container is moving). It'd likely be a substantial amount of work and may be fraught with potential "gotchas". You may want to either change your design or hire an expert who could tackle the complex setup (sounds expensive). 

 

No worries, I'll just separate out into 5 separate triggers! I was wondering why it was so hard... lol.

 

Thank you for letting me know.

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