title: Make div appear while scrolling within a specific range on web page
body: <p>I would like a div to appear when the user scrolls to a specific place on the page (900 pixels down) and then disappear at a specific place (1800 pixels down).  I have a solution which works, however it breaks when the user scrolls back up, past the initial appear point (900 pixels from top).</p>
  
  <p>At that point it does not go away again.  So to summarize, I need assistance modifying my code to make the div disappear again after passing the original point it appeared at.</p>
  
  <p>Here is a link to my test page: <a href="http://jltest.biz/test-1" rel="nofollow">http://jltest.biz/test-1</a></p>
  
  <p>Below is my code:</p>
  
  <pre><code>var startY = 900;
  var stopY = 1800;
  
  $(window).scroll(function(){
      checkY();
  });
  
  function checkY(){
      if( $(window).scrollTop() &gt; startY ){
           if( $(window).scrollTop() &gt; stopY ){
           $('.fixedDiv').fadeOut("slow");
     }
     else
     {  $('.fixedDiv').fadeIn("slow"); }
  }
  }
  
  checkY();
  </code></pre>
  
  <p>Thank you for your time!</p>