How do I toggle HTML links from being active / deactive using JavaScript?
Within my HTML, I have 2 hyper links that call a JavaScript function to sort a table:
<a href="javascript:sort('asc');">ASC</a> | <a href="javascript:sort('desc');">DESC</a>
What I would like to do is when someone clicks the "ASC" link, it then deactives the "ASC" hyperlink (no longer a link) so that only now the "DESC" link is active.
Then, if the person presses the "DESC" link, it then disables the "DESC" link and re-enables the "ASC" link.
Essentially, I want to toggle between which link is active, either: "ASC" or "DESC"
I assume you can do this with JavaScript but am not sure how?
Any ideas?