Jump to content
Search Community

ScrollTrigger with end trigger is an other element

Huy Nguyen 2K test
Moderator Tag

Recommended Posts

I'm struggling to understand what you're trying to do there. child2 is position: absolute and is at the very top from the beginning, so why would you want to use that as an endTrigger? And right now, you've got "end" being a relative value (starts with "+=") which makes it relative to the start, thus the "endTrigger" wouldn't even matter. 

 

Maybe it'd help if you explained exactly what you wanted to happen and what isn't working right now. 

  • Like 1
Link to comment
Share on other sites

56 minutes ago, GreenSock said:

I'm struggling to understand what you're trying to do there. child2 is position: absolute and is at the very top from the beginning, so why would you want to use that as an endTrigger? And right now, you've got "end" being a relative value (starts with "+=") which makes it relative to the start, thus the "endTrigger" wouldn't even matter. 

 

Maybe it'd help if you explained exactly what you wanted to happen and what isn't working right now. 

Because in my case, I want when end scrollTrigger animation of box1, box2 must be next to child2 but currently it is overwrite each other.

Link to comment
Share on other sites

3 hours ago, Huy Nguyen 2K said:

Because in my case, I want when end scrollTrigger animation of box1, box2 must be next to child2 but currently it is overwrite each other.

I read that 5 times and I'm still completely lost, sorry. I don't understand what you're trying to do. child2 takes up the whole screen, so how could it be next to child1?  And what do you mean about overwriting? 

  • Like 1
Link to comment
Share on other sites

4 hours ago, GreenSock said:

I read that 5 times and I'm still completely lost, sorry. I don't understand what you're trying to do. child2 takes up the whole screen, so how could it be next to child1?  And what do you mean about overwriting? 

Sorry because I'm not explain clearly, I want to run animation in box1 with scrollTrigger but I have a problem when use pin with scrollTrigger, it's create pin spacer element to embrace box1 and you can see in box1 there are two elements child1 and child2 but child2 larger than it's parent. Is any way to pin spacer element also embrace child2 element?

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