I have a following link in my code:
<li onclick="loadNewPage('test')"><a href="#">Link</a></li>
When the user click this link, I will use xmlHttpRequest to update some content in a DIV on the webpage.
But at the same time, when the user click the link, I want to add an id, so that the state of the button can be changed using CSS. (note the "id" being added to the link)
<li onclick="loadNewPage('test')"><a href="#" id="current">Link</a></li>
At the same time, if these is any other link on the page with the id "current" I want to remove that ID.
Is this possible? How to do this?