Share Posted March 8 Hello I'm trying to get the titles on the left to add an active class when the related (by data-attributes) block on the right scroll to top. The blocks and titles are all found when I console.log them but the toggle class function isn't firing. I've tried using the onToggle: self functions but with the same result. I can't figure it out, what am I missing? See the Pen ZEMXoVg by Cottonltd (@Cottonltd) on CodePen Link to comment Share on other sites More sharing options...
Share Posted March 8 I would copy the logic from the pen on the ScrollTrigger demos page, see below. Hope it helps and happy tweening! See the Pen bGVjLwG?editors=0010 by GreenSock (@GreenSock) on CodePen 3 Link to comment Share on other sites More sharing options...
Author Share Posted March 16 Thanks @mvaneijgen. The project has gone on the back burner since I posted this so haven't had chance to sit with it again. Looks like the effect is plain and simple in the demo so thanks for pointing me in that direction! Link to comment Share on other sites More sharing options...
Solution Author Solution Share Posted March 23 Really silly error that I missed to fix this. The panels/sections were 100vh so were ending the trigger as soon as it had started so just needed to alter the 'start' and 'end' positions. See the Pen OJoaZXW by Cottonltd (@Cottonltd) on CodePen 2 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