title: set body to overflow hidden when div is called
body: <p>I have an on click function that hides and shows a div. </p>
  
  <p>When the div is clicked I want the body to have <code>overflow: hidden;</code> - this works, but when I close the div the "body" still has <code>overflow: hidden;</code>, but I want it to be <code>overflow: scroll;</code></p>
  
  <p>Can you help me?</p>
  
  <p>I've read <a href="https://stackoverflow.com/questions/21723076/how-i-set-body-overflow-hidden-when-some-class-called">this post</a> but havent managed to fix it.</p>
  
  <p>Here is my jQuery:</p>
  
  <pre><code>$(document).ready(function() {
      $(".headeropen").hide();
      $(".headerclosed").show();
  
      $('.headerclosed').click(function() {
          $(".headeropen").slideToggle();
          $('body').css('overflow', 'hidden');
      });
  });
  </code></pre>