Target div using URL's href value
<p>I have a simple site where each "page" is actually a <code>section</code>. The sections are layered on top of each other using <code>position:absolute</code> and <code>z-index</code>; when a navigation item is clicked, the section with an id matching the class name of the navigation item is promoted to the top of the stack, changing the "page".</p>

<p>What's got me stuck now, though, is figuring out how to target a particular section from a link within the content of another section. I know the gist of what I have to do, but I'm lost as far as the execution goes.</p>

<p>How I imagine it needs to go is this:</p>

<pre><code>$('section a[href^=#]').click(function(){
                var target = $(this).attr(href).(strip the hashtag from the beginning of the link and output the resulting value);
$('body').find('section[id='+target+']').addClass('active').css('z-index', '2')
$('body').find('section[id!='+target+']').removeClass('active').css('z-index', '1')
                });
</code></pre>

<p>I imagine this involves RegEx somehow, which I know nothing about. Any thoughts?</p>
