Jump to content
GreenSock

Mukhriddin

how to add active class to another element while scrolling other blocks

Recommended Posts

Hi, there!

I wanted to add active class so that when scrolling blocks related item gets active with bigger font-size and white color. I added manually to the first item so that you can easily understand what I mean. So once the first block (Scroll down text-page) leaves the viewport, first item gets inactive and the second one starts to be active, etc.

I'd really appreciate your help)

See the Pen OJQeNpX by mshakhriyorov (@mshakhriyorov) on CodePen

Link to comment
Share on other sites

There are multiple topics on the forum giving detailed explanations on this topic. There probably one that does what you want

 

 

Anchor links 

 

  • Like 2
Link to comment
Share on other sites

those posts @mvaneijgen are super useful. I had this demo laying around so here it is :)

 

See the Pen abqgBVP by snorkltv (@snorkltv) on CodePen

  • Like 1
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.
×