title: How to change the color of clicked link using jquery
body: <p>I have written jquery as following</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
       var jq = $.noConflict();
       jq(document).ready(function(){
       jq("a.tag-link").click(function(){
       jq(".selected").removeClass("selected");
       jq(this).addClass("selected");
      });
     });
    &lt;/script&gt;
  </code></pre>
  
  <p>The html is something like </p>
  
  <pre><code> &lt;a href="home.html"class="tag-link selected" &gt;home&lt;/a&gt;
   &lt;a href="about-us.html"class="tag-link" &gt;about us&lt;/a&gt;
   &lt;a href="why-us.html"class="tag-link" &gt;why-us&lt;/a&gt;
  </code></pre>
  
  <p>In css    <code>a.selected{color:red;}</code>
  Now my problem is that when I click on let us say about us link, its color get changed to red only when it is clicked. But after it gets redirected to about us page.Its color changes to default one. It does not turn to red. I want that the clicked link should be red color and others should be in default color.Please please help me... </p>