Show Active Nav Link with JavaScript

preview_player
Показать описание
In this video, I'll show you how to show which page is the active webpage to set it apart visually.

🔗 Key Links 🔗

---------------------------------------

📹 Related Videos 📹

---------------------------------------

🌐 Connect With Me 🌐
Рекомендации по теме
Комментарии
Автор

Just a heads up, the text-decoration shorthand notation doesn't work in Safari.

Marty
Автор

Of all the Tutorials, this is the most straight forward and short solution. Thanks a lot!

DragonRoyZ
Автор

I never thought this would be done in a simpler way. thanks

johnmarkbondad
Автор

And, you just elevated what already was a high quality content of tutorials.
Aria labels are important but often neglected.

P.S. Video description is from one of the previous videos.

MarshallSC
Автор

Literally made my life easier I am trying to do my own stuff because bs got confusing after a while when I was using it so I want to do my own thing now thanks for the insperation

AlThePal
Автор

Thanks for sharing this amazing way to add the current page indicator. It's easy to implement and adds accessibility.

neontuts
Автор

Very clear explanation in a short amount of time! Clever! Thanks a lot.

adnanamin
Автор

Extremely helpful with new solutions like always. Thank you so much, Chris.

anonymouseverx
Автор

As always, clear step by step explanation, anyway i enjoyed that part of window object

humbulanimunyai
Автор

I always make a custom class active and switching between this class manually between page's but not anymore after watching this.🥰 Thank you

Fatima-iekj
Автор

I needed this so much, thank you for this clear vid.

astroboy
Автор

This is awesome! It's both accessible AND cool. Thank you

lukecartwright
Автор

thanks, this was to the point and nicely explained. :)

lhc
Автор

Nice tutorial. For tutorials though, can you use a more easy to read font (for class and href for example) for some of your elements in the code. Just makes it easier to digest.

ClarkeDesign
Автор

Great explanation, btw any way to animate that wavy underline so it looks like it's moving?
With css only if possible otherwise any other way?
I'm using react+tailwind so I don't want to depend on any other libraries or frameworks if possible

blackpurple
Автор

thanks for the video! one question, how can I keep the aria-current attribute in a navigation link after selecting a child page of that link?

axvgarcia
Автор

Fantastic! Thanks for the tutorial, but it looks like this is not working for dropdown menu, isn't it?

samnorte
Автор

For some reason my console is not showing the links. Ive correctly linked my external JS file but the following code does'nt seem to work:


(link => {
console.log(link);
})

EDIT:

does the file have to be html or can it be php?

figureof
Автор

What software did u use for your coding?

sydneysolomon
Автор

how to use same navbar in all webpages of the website and also this trick to show active nav link

luckyrao