Highlight current page tab when div is nested
<p>I need to highlight the tab which is for the current page with jquery. A simple task usually with a few lines of code I know. However, the tab is not your usual thing as I have a toolbar and have done it with spans. The span for the tab is  inside the link so that the tab can be clicked as well as the text inside it. Since I only have two tabs that are links on the toolbar I was thinking of using an if else statement in jquery to determine which page the user is on and therefore which tab to highlight but i am not too sure how to do that.</p>

<p>The markup for the tabs is;</p>

<pre><code> &lt;a href="Home"&gt;
     &lt;span class="navButton" title="Return Home"&gt;
         Home
     &lt;/span&gt;
 &lt;/a&gt;
 &lt;a href="Discover"&gt;
     &lt;span class="navButton" title="Discover The Unsigned"&gt;
          Discover
     &lt;/span&gt;
 &lt;/a&gt;
</code></pre>

<p>The jquery I have at the moment that doesnt work is;</p>

<pre><code> $(function(){
     var path = location.pathname.substring(1);
     if ( path )
     $('#navButton a[href$="' + path + '"]').css ('box-shadow', 'inset 0 0 10px #000000');
 });
</code></pre>

<p>Note: I will be adding the css style rather than a class as it will keep other things simpler. </p>
