title: jquery - disable click
body: <p>I just want to disable the ability for a user to click on an element for some condition.  Here is some of the code I am working with:</p>
  
  <pre><code>     $('#navigation a').bind('click',function(e){
  
      var $this   = $(this);
      var prev    = current;
  
      current = $this.parent().index() + 1; // store the position in current
  
      if (current == 1){
      $("#navigation a:eq(1)").unbind("click"); // i want to disable the ability to click this element if current is 1
      }
      if (current &gt;= 2){
      $("#navigation a:eq(1)").bind("click"); // this is wrong, but I want to rebind the click if current is greater than 1.  
      }
  </code></pre>
  
  <p>}</p>