Keep class active when clicking another url, jquery
<p>Im experimenting a bit with jquery and having a big problem which i have been trying to solve for the past day with google but not sure how to figure it out. </p>

<p>I use a index.php page with a simple php script to retrieve my content from a db, i use links like: <code>index.php?title=abou</code>t (example). I found a small jquery script that adds a class active to the <code>&lt;li&gt;</code> you click on, this works perfect if the url is (<code>#about</code>), it keeps the class active until other link is clicked. but if its an url like "<code>index.php?title=about</code>" its removes the active class.</p>

<p>This is my css / html and jquery, my question is how do i keep the button active when its being clicked.</p>

<pre><code>    &lt;style type="text/css"&gt; 
    .nav li { list-style: none; cursor:pointer; }
    .nav li a { display: block; width: 279px; height: 30px;}
    .nav-home { background: url(img/home.png); width: 279px; height: 27px; }
    .nav-home.active, .nav-home:hover { background: url(img/home_1.png); width: 279px;          height: 27px;}
    .nav-video { background: url(img/video.png); width: 279px; height: 27px; }
    .nav-video.active, .nav-video:hover { background: url(img/video_1.png); width: 279px; height: 27px;}
    .nav-contact { background: url(img/contact.png); width: 279px; height: 27px; }
    .nav-contact.active, .nav-contact:hover { background: url(img/contact_1.png); width: 279px; height: 27px;}
    &lt;/style&gt; 
</code></pre>

<p>html and jquery:</p>

<pre><code>    &lt;ul class="nav"&gt;
    &lt;li class="nav-home"&gt;&lt;a href="index.php?title=home"&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nav-video"&gt;&lt;a href="index.php?title=video"&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li class="nav-contact"&gt;&lt;a href="index.php?title=contact"&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;script type="text/javascript"&gt;
    $('.nav li').click( function() {
    $(this).addClass('active').siblings().removeClass('active');
    });
    &lt;/script&gt;
</code></pre>

<p>Any help would be really appreciated, kinds regards</p>
