KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I've got a problem. I want to add the class "active" on item menu when the relative page is on. the menu is very simple: <div class="menu"> <ul> <li><a href="~/link1/">LINK 1</a> <li><a href="~/link2/">LINK 2</a> <li><a href="~/link3/">LINK 3</a> </ul> </div> In jQuery I need to check if the url is www.xyz.com/other/link1/ if it's this one I would like to add a class one the 'a' element of link1. I'm trying many solutions but nothing work.
Tags (comma-separated)
Save Edits
Cancel