jQuery Tutorial: Add Active Class to Navigation Menu Item Based on URL

jQuery Tutorial: Add Active Class to Navigation Menu Item Based on URL

John Morris

8 лет назад

38,252 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@yeasinjabed3630
@yeasinjabed3630 - 26.11.2019 01:55

Thanks a lot ❤

Ответить
@_-Rumcajs-_
@_-Rumcajs-_ - 14.09.2019 22:18

OK. How to do that from dropdown sub menu item?

Ответить
@kenanboyukkishiyev4181
@kenanboyukkishiyev4181 - 13.05.2019 13:53

It is works thank you from Azerbayjan

Ответить
@wadethomas5984
@wadethomas5984 - 02.01.2019 04:04

Hey Thanks a lot it works just great !

Ответить
@seatielb.austria5582
@seatielb.austria5582 - 08.10.2018 10:02

Thankyou so much!

Ответить
@eppachan
@eppachan - 31.07.2018 11:47

Thanks man..it worked...But I only needed window.location.pathname to get the path

Ответить
@MainHeadArgentina
@MainHeadArgentina - 28.03.2018 19:36

Very easy to learn.. thanks a lot! I search this for all the morning! Thanks thanks!

Ответить
@kenvinnguyen7182
@kenvinnguyen7182 - 28.01.2018 16:31

Thank you so much !

Ответить
@gortex8383
@gortex8383 - 20.01.2018 01:45

why would you turn your javascript off? I'm just wondering. For testing or something?

Ответить
@OpenMindNow
@OpenMindNow - 24.12.2017 01:55

many thanks , I have tired to reach to this solution :3

Ответить
@paoheels836
@paoheels836 - 02.08.2017 04:05

I prefer to do it with PHP but is an interesting way of doing it. Thanks!!

Ответить
@sayaksaha8242
@sayaksaha8242 - 11.04.2017 20:57

Thank you for this awesome tutorial...you helped me a lot..thank you!

Ответить
@julien3563
@julien3563 - 16.01.2017 01:18

thank you so much, i have bugged for so long time on this probleme

Ответить
@bismazargar6065
@bismazargar6065 - 31.12.2016 20:21

That absolutely works but what if About item in the menu has submenu and we want About item highlighted if any of the submenu is active.

Ответить
@GustavoOliveira-nz3qe
@GustavoOliveira-nz3qe - 23.07.2016 09:16

Does this method works for .html files or just .php? Mine is .html and it is not working.

Ответить
@gauravphatak8626
@gauravphatak8626 - 13.07.2016 08:09

Thank you so much!! code work perfectly.

Ответить
@IrakliKhakhviashvili
@IrakliKhakhviashvili - 28.09.2015 18:44

Bought Rob's Complete web developer course with your coupon, it looks very interested so far!

Ответить
@john17dc
@john17dc - 22.09.2015 17:48

This is was a helpful tutorial, but i agree with you on the part that all this should be done at the server side only.
Or maybe that's just me, i'm more of a server side guy, i've just started the front-end part (bootstrap + jQuery). I hope it doesn't take long before i can call myself a complete web dev.

And as always, thank you. I look forward to your tutorials every week.

Ответить