Hello,
I am making a javascript menu and I want to make the menu item that is currently loaded appear with different style than the other menu items. This can only be fixed in the javascript code loaded before the page so I tried to compare the location.href with the href value of the menu item and load different styles when href==location. href
this doesn't work even though i tried hard so i guess i am missing something. If you know how I am supposed to compare href (the value of the menu item) to location.href and changes styles please help me because I am really upset with that.
Thank you for your help
Theoni
I am making a javascript menu and I want to make the menu item that is currently loaded appear with different style than the other menu items. This can only be fixed in the javascript code loaded before the page so I tried to compare the location.href with the href value of the menu item and load different styles when href==location. href
this doesn't work even though i tried hard so i guess i am missing something. If you know how I am supposed to compare href (the value of the menu item) to location.href and changes styles please help me because I am really upset with that.
Thank you for your help
Theoni
Comment