title: detach and reattach event listeners
body: <p>Is there a way to detach and reattach event listeners assuming I don't know the function that was attached in the first place?</p>
  
  <pre><code>//Unknown click function
  $(target).click(function(e){
      //some function
  });
  
  //code to detach click function
  $(target).mousedown(function(e){
      if(/*something*/){
          //The next line does not work. What could be done instead?
          this.clickFunction = $(target).click;
          $(target).off("click");
      }
  });
  
  //code to reattach click function
  $(target).mouseup(function(e){
      if(this.clickFunction){
          $(target).click(this.clickFunction);
          this.clickFunction = null;
      }
  });
  </code></pre>