Jump to content
Search Community

ScrollTrigger toggle class of a related element not firing

cotton test
Moderator Tag

Go to solution Solved by cotton,

Recommended Posts



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

  • 2 weeks later...

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