Streaming live at 10am (PST)

Prevent default on active navlink?

Hello Webflow community!

Is it possible to target current link state and prevent it from reloading on click.
I don’t want anything to happen when clicked.

Thanks!

With Javascript, yes.

But there was a user here who achieved this by having all the navlinks set to z-index=10, then having an absolute element (a transparent div) under each link set to z-index=9. And he was setting the Current state to z-index=8 so that the link would pass under the transparent div, preventing the link to be clicked.

2 Likes

Thats a really clever solution!
Worked perfectly!

Thank you!