```
page = 1;

$('.links').click(function() {
    $(this).removeAttr('href');
    page = $(this).html();
});

<a href="#" class="links"> 1 </a>
<a href="#" class="links"> 2 </a>
<a href="#" class="links"> 3 </a>

```

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?

Jsfiddle: <http://jsfiddle.net/JGpF9/>