rexarvind Posted May 6, 2022 Share Posted May 6, 2022 How can I toggle "active" class to element in center of screen (only one element at a time) See the Pen BaYowgR by rexarvind (@rexarvind) on CodePen Link to comment Share on other sites More sharing options...
OSUblake Posted May 6, 2022 Share Posted May 6, 2022 Just like I said in your other post, you can use a containerAnimation to do that. Link to comment Share on other sites More sharing options...
rexarvind Posted May 7, 2022 Author Share Posted May 7, 2022 I tried but that is only working on first element and not all Link to comment Share on other sites More sharing options...
Cassie Posted May 7, 2022 Share Posted May 7, 2022 Hey there. ☺️ You need to loop around the elements. Like so - See the Pen bGLEVoL?editors=0010 by GreenSock (@GreenSock) on CodePen Happy tweening! 1 Link to comment Share on other sites More sharing options...
rexarvind Posted May 7, 2022 Author Share Posted May 7, 2022 Thank you so much Link to comment Share on other sites More sharing options...
GreenSock Posted May 9, 2022 Share Posted May 9, 2022 If you need to ensure that there's always one section activated, here's a solution: See the Pen BaYKBpB?editors=0010 by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
rexarvind Posted May 19, 2022 Author Share Posted May 19, 2022 On 5/9/2022 at 12:22 PM, GreenSock said: If you need to ensure that there's always one section activated, here's a solution: waaooww, this is very clever thank you for this a lot 1 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