title: How to hide div when scrolling down and then show it as you scroll up?
body: <p>Okay bear with me, I know this might have been asked a few times but I can't get the exact answer after searching a bit.</p>
  
  <p>Basically what I want is as the user starts to scroll down, after a certain height the div disappears.. and it remains disappeared until the user starts to scroll up. Right when the user starts to scroll up, the div appears again. I need some sort of fade effects for this as well.</p>
  
  <p>This is what I've come up with by looking at other answers so far. With this, the div does disappear after a certain height as you scroll down, but it only re-appears when you reach that same height when you scroll up. I want the div to immediately show itself when the user starts to scroll up. This code doesn't have any animations either...</p>
  
  <pre><code>jQuery(window).scroll(function() {
  
      if (jQuery(this).scrollTop()&gt;0)
       {
        jQuery('.myDIV').fadeOut();  
       }
      else
       {
        jQuery('.myDIV').fadeIn();
       }
   });
  </code></pre>