I think this example would make it clear. My HTML is this:
<li class='nav-active'><span class='maillink' id='spnInbox' >Inbox</span></li>
<li><span class='maillink' id='spnSentMail'>Sent Mail</span></li>
<li><span class='maillink' id='spnDraft'>Draft</span></li>
<li><span class='maillink' id='spanTrash'>Trash</span></li>
When the user clicks on any other link say Draft then I want to clear the nav-active from inbox "li" and assign that class to draft "li". My question is how to get to nav-active li from .maillink click event. I know I can write an each function and remove it but I was wondering if there is a selector to do this.
Thanks for your help.