title: jQuery unbind click event function and re-attach depending on situation
body: <p>The code below I use to create a sliding menu. I need to know how to unbind the function attached to the click event and re-attach it some other time. (using jQuery 1.7.2)</p>
  
  <pre><code>$(document).ready(function(){
      $('.section').hide();
      $('.header').click(function(){
        if($(this).next('.section').is(':visible'))
        {
          $('.section:visible').slideUp()              
          $('.arrows:visible').attr("src","right.gif")
        }
        else
        {
          $('.section').slideUp();
          $(this).next('.section').slideToggle();
          $(this).find('.arrows').attr("src","down.gif")
      });
  });
  </code></pre>
  
  <p>The code below is what I have so far</p>
  
  <pre><code>$('#printVers').click(function(){
     if($('#formVersion').val() != "Print")
     {
       $('.header').unbind('click');
     }
     else
     {
       //else re-attach functionality?
     }
  });
  </code></pre>
  
  <p>Thanks</p>