Anchor link is not adding current class

issue:
on the home2 page -
The “current” class is not being added to the nav links “work” and “about” on the side of the page that are set to scroll down the page to it’s respective anchors. I hope someone can help me figure this out.

here is the link:
https://preview.webflow.com/preview/origamidesign?utm_source=origamidesign&preview=19aa8c179c7bf94a94e7d542f38f05b9


Here is my public share link: LINK
(how to access public share link)

Missed reference to Home2. Reviewing

1 Like

yes, I’ve just visited the link to double check. go to page titled home2, when you click either work or about you will see that the page scrolls to an anchor (watch the scroll bar move) and current class should be added but for some reason it is not

Two menu items point to the same anchor. Try changing that.

done, no effect (and the rest of twenty characters :smiley: )

The issue is that the anchor is only 10px high

In your first post you said "

The w–current class is the class webflow adds to links in a navbar component. Looks like you have a custom sidebar menu you created without that component. If that is the case you would need to add the class you want to use to style those links when the location changes (clicked a link to an anchor) pragmatically. In webflows case, you would do it via JavaScript (client side).

It works - the issue was that the anchor was only 10px high so the class was added and immediately removed. After I’ve increased the hight it works as expected. Thank you for the help investigating - much appreciated!

I did not see the w–current class on the active section on the published site. Glad your all set. Cheers

1 Like