add and remove class works with blank link but not with page link
<p>I am really noob on jquery but I tried almost more than my best to solved it out by reading old posts created by valuable users of Stackoverflow.
My problem is I try to add class onclick event. Its working only if I set the hyperlink link to blank(#) <code>&lt;a href="#"&gt;test&lt;/a&gt;</code> but if i set to hyperlinks status to <code>&lt;a href="product.php"</code> then it removes and adds class for a while and after the current page is open, it automatically removes the active class and set it as previous. :(
My js code..</p>

<pre><code>$('ul#menu li a').click(function() {
    $('ul#menu li a').removeClass('active');
    $(this).toggleClass('active');
});
</code></pre>
