stargateatlantis
asked on
jquery targeting parent to add class
I have the following code here Trying to figure out how to add a class named active to the list tag.
<ul id='sub-nav'>
<li><a href='#one'>Item One</a></li>
<li><a href='#two'>Item Two</a></li>
<li><a href='#three'>Item Three</a></li>
<li><a href='#four'>Item Four</a></li>
</ul>
$("#sub-nav a[href='#one'']").click(function(){
/*Trying to figure out how to add a class named active to the list tag */
})
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.