title: How to Fade in a DIV After Scrolling Down, then Fade it Out at the Bottom
body: <p>I have a div that I want to fade in after the user scrolls 600px down the page. I have achieved this easily enough using the code below:</p>
  
  <pre><code>&lt;script&gt;
  $(window).scroll(function(){
  if($(window).scrollTop()&gt;600){
  $("#fade-in-area").fadeIn();
  }else{
  $("#fade-in-area").fadeOut();
  }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>I want the same div to fade out about 600 pixels from the bottom of the page. I have seen a couple other people trying to do this, but can't figure out how to have it both fade in, and fade out.</p>
  
  <p>It should be pretty easy for a regular Javascript programmer I'd think.</p>
  
  <p>Can anyone help me out?</p>