title: fade out on scroll 100px before reaching document height of 100%
body: <p>On scroll a fixed div fades in than when a scroll reaches 100px before document height it needs to start fading out. </p>
  
  <p>please, can someone point out where is a mistake in the code below?</p>
  
  <pre><code>$(window).scroll(function() {
  if ($(window).scrollTop()&gt;100) {
      $('#boxcont').fadeIn();
  }
  else {
      $('#boxcont').fadeOut();
  }
  if ($(window).scrollTop() + 100 &gt; $(document).height() - $(window).height() ){
      $('#boxcont').fadeOut();
  }
  });
  </code></pre>
  
  <p>here's <a href="http://jsfiddle.net/vmrSY/" rel="nofollow">FIDDLE DEMO</a></p>