movieprodw
asked on
use jquery to mark a link as active depending on the url
Hello,
I have:
Is there a way to add the class 'active' if the url is the href with jquery?
I have:
<div class="col-left sidebar"><ul>
<li><a href="/installation" class="button-link">Installation</a></li>
<li><a href="/tuning" class="button-link">Tuning</a></li>
<li><a href="/101" class="button-link">101</a></li>
<li><a href="/about-us" class="button-link">About</a></li>
<li><a href="/tour-our-facility" class="button-link">Tour Our Facility</a></li>
<li><a href="/meet-the-team" class="button-link">Meet The Team</a></li>
<li><a href="/careers" class="button-link">Careers</a></li>
<li><a href="/contact" class="button-link">Contact Dyno-Comp</a></li>
</ul></div>
Is there a way to add the class 'active' if the url is the href with jquery?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You are welcome.
ASKER