Here are my bindings
<a ID="lnkbtn0" class="page-numbers" href="#">1</a>
<a ID="lnkbtn1" class="page-numbers" href="#">2</a>
<a ID="lnkbtn2" class="page-numbers" href="#">3</a>
<a ID="lnkbtn3" class="page-numbers" href="#">4</a>
And my click function I add cssclass to show that this is the current anchor
$("a.page-numbers").click(function() {
$(this).addClass('page-numbers current');
});
What happens when I click the next anchor, the same class is added to the current and previous binding ... What can be done to remove cssclass page-numbers currentand assign cssclass to the page-numbersprevious / all other anchors without changing the current ....
source
share