The problem is I have a navigation in two parts. Top Nav and Left Nav. I need to tell the top link to have a class of ".active" if the left navigation's sibling is the current url.
EX: If you're on a child link of about ie - Bio I need to tell the top nav link About link to have the class of .active.
<--top nav-->
Home | About | Contact
<-- Lots of code here -->
<--Left Nav-->
<ul id="leftnav">
<li>Home</li>
<li><a href="ul.com/">About</a>
<ul>
<li>Bio</li>
<li>History</li>
<li>Location</li>
</ul>
<li>Contact</li>
</ul>
NOTE:
This is the code I use in my Accordion to tell it to open if the url is one of the siblings but I can't seem to figure out how to check the url then compare it to it's parent and then target a different element etc.
$(document).ready(function() {
currentPage = window.location.pathname;
$('.sidebarNav li a[href$="' + currentPage + '"]').eq(0).parents('ul').show();
});