title: JavaScript: toggle links active/deactive
body: <p><strong>How do I toggle HTML links from being active / deactive using JavaScript?</strong></p>
  
  <p>Within my HTML, I have 2 hyper links that call a JavaScript function to sort a table:</p>
  
  <pre><code>&lt;a href="javascript:sort('asc');"&gt;ASC&lt;/a&gt; | &lt;a href="javascript:sort('desc');"&gt;DESC&lt;/a&gt;
  </code></pre>
  
  <p>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.</p>
  
  <p>Then, if the person presses the "DESC" link, it then disables the "DESC" link and re-enables the "ASC" link.</p>
  
  <p>Essentially, I want to toggle between which link is active, either: "ASC" or "DESC"</p>
  
  <p>I assume you can do this with JavaScript but am not sure how?</p>
  
  <p>Any ideas?</p>