title: Disabling links with JQuery
body: <p>I have the following code which does a function similar to the way the comment link works here on Stackoverflow... when clicked it triggers a ActionResult and populates a div</p>
  
  <pre><code>   $(function() {
          $("a[id ^='doneLink-']").live('click', function(event) {
              match = this.id.match(/doneLink-(\d+)/);
              container = $("div#doneContainer-" + match[1])
              container.toggle();
  
              if (container.is(":visible")) {
                  container.load($(this).attr("href"));
              } else {
                  container.html("Loading...");
              }
              event.preventDefault();
          });
      });
  </code></pre>
  
  <p>I want to be able to do one things change the link text that of which they clicked on to say something like "Hide" and also disable other links in the little menu that this link resides.</p>
  
  <p><strong>Edit:</strong> 
  The source to go with this function looks like this</p>
  
  <pre><code>&lt;div id="dc_lifelistmenu"style="float:left;padding-bottom:5px;font-size:10pt;width:400px;"&gt;
      &lt;a href="/entries/addentry/86"&gt;Add Entry&lt;/a&gt; | 
      &lt;a href="/goals/adddaimoku/86" id="daimokuLink-2"&gt;Log Daimoku&lt;/a&gt; | 
      &lt;a href="/goals/done/86" id="doneLink-2"&gt;Mark Completed&lt;/a&gt; |
      &lt;a href="/goals/remove/86"&gt;Remove&lt;/a&gt;
  &lt;/div&gt;&lt;br /&gt;
  &lt;div id='daimokuContainer-2' style="display:none;"&gt;  Loading...&lt;/div&gt;
  &lt;div id='doneContainer-2' style="display:none;"&gt;  Loading...&lt;/div&gt;
  </code></pre>