AndresBG Posted February 23, 2022 Share Posted February 23, 2022 Hey guys! how are you? I´m starting to learn GSAP and Scrolltrigger. I would like to know how can I create an interaction like the one I did in the codepen sample. The only difference that I dont understand is how to open only one box at a time and the others make collapse when they are out of the center of the viewport. Please can you help me with that? thanks in advance! See the Pen wvPXEBM by andresbg (@andresbg) on CodePen Link to comment Share on other sites More sharing options...
OSUblake Posted February 23, 2022 Share Posted February 23, 2022 Hi Andres, That's sounds tricky, and probably not performant because your markers are getting out order, just like I mentioned here. What's going to complicate it even further is that if a box above what's in the center collapses, it's going shift everything up, so what was in the center may not be in the center once it starts animating. I would definitely suggest rethinking what you are trying to do here. Like maybe have all the animations in a single timeline and then scrub that. 🤷♂️ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now