title: Jquery Scroll to BOTTOM to load new content is working in opposite way (i.e) on Scrolling TOP
body: <p>I am working on a website, which has scroll to <strong>BOTTOM</strong> to load AJAX content.</p>
  
  <p>I use this Jquery Scroll function:</p>
  
  <pre><code>$(window).scroll(function() { 
  
    if($(window).scrollTop() + $(window).height() == $(document).height())  
      {
  
        alert("ScrollTop + Window Height = "+$(window).scrollTop()+ " + " +
        $(window).height()+ " == Document Height = "+$(document).height());
  
        // This get's alerted only when i reach TOP
      }
  
    });
  </code></pre>
  
  <p>But this works only if i reach <strong>TOP</strong></p>
  
  <p>Do anyone had this problem before ?</p>