title: div fade-in when window is scrolled a certain distance from the top
body: <p>I have the following script in my <code>&lt;head&gt;</code> tag which animates my <code>div</code> when the window is 150px from the bottom. I am not sure how to alter it so it animates when a certain distance from the top.</p>
  
  <pre><code>&lt;script&gt;
    $(window).scroll(function() {
    if($(window).scrollTop() + $(window).height() == $(document).height()-150){
    isShown = true;
    $('.footer-btn').fadeIn(500);
    }else{
    $('.footer-btn').fadeOut(500);
    }
    });
  &lt;/script&gt;
  </code></pre>