title: disable .click function on an anchor in jquery
body: <p>This is written in an external .js with jquery...</p>
  
  <p>I have two windows that slide in and out of view like:</p>
  
  <pre><code>$(document).ready(function() {
    // hides gallery1 as soon as the DOM is ready  
    $('#gallery1').hide();  
    // shows the menu on click   
    $('#showgal1').click(function() {  
      $('#gallery1').delay(490).show('slide', {direction:'left'});
      $('#gallery2').hide('slide', {direction:'right'});
      //need code to disable showgal1 and enable showgal2
    });
    $('#showgal2').click(function() {  
      $('#gallery2').delay(490).show('slide', {direction:'right'});
      $('#gallery1').hide('slide', {direction:'left'});
      //need code to disable showgal2 and enable showgal1
    });
  });
  </code></pre>
  
  <p>'gallery1' and 'gallery2' are DIV's with flash image galleries and 'showgal1' and 'showgal2' are id's of anchors...</p>
  
  <p>looks like</p>
  
  <pre><code>&lt;a href="#" id="showgal1"&gt;gallery 1&lt;/a&gt;
  </code></pre>
  
  <p>I cannot find a way to disable the .click function when one is clicked and re-enable the other...</p>
  
  <p>i want to disable 'showgal1' by default and when 'showgal2' event takes place it removes the attribute and makes 'showgal2' disabled until 'showgal1' is clicked...</p>
  
  <p>the <code>.attr('disabled','disabled')</code> hasn't worked yet...</p>