title: JQuery pagination -- clicking page numbers and removing href attr
body: <pre><code>page = 1;
  
  $('.links').click(function() {
      $(this).removeAttr('href');
      page = $(this).html();
  });
  
  &lt;a href="#" class="links"&gt; 1 &lt;/a&gt;
  &lt;a href="#" class="links"&gt; 2 &lt;/a&gt;
  &lt;a href="#" class="links"&gt; 3 &lt;/a&gt;
  </code></pre>
  
  <p>when I click a page number, I want to remove the href attribute. The problem is, if I click pages consecutively, the previous page numbers clicked dont regain their href attribute. How could I do this?</p>
  
  <p>Jsfiddle: <a href="http://jsfiddle.net/JGpF9/" rel="nofollow">http://jsfiddle.net/JGpF9/</a></p>