jquery highlight menu
<p>I have this script that highlight the nav menu when clicked but after the click the selected class disappears. Is there a workaround in here to make the selected class in effect after the clicked?</p>

<pre><code>&lt;script type="text/javascript"&gt;
$( document ).ready( function() {
    $( '#nav ul li a' ).click( function() {
        $( '#nav ul li' ).removeClass( 'selected' );
        $( this ).parent( 'li' ).addClass( 'selected' );
        alert('hello');
    });
});

&lt;/script&gt;
    &lt;div id="nav"&gt; 
        &lt;ul&gt;    
            &lt;li&gt;&lt;a href="/"&gt;Home&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="/blog/"&gt;Blog&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="/about/"&gt;About&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
</code></pre>
