title: jQuery height doesn't equal scrollTop
body: <p>In my jquery I am trying to calculate when the scrollbar is 100px from the bottom, and when it gets there I will do an ajax query (for now I am doing an alert as you can see).</p>
  
  <pre><code>$(document).on("scroll", function(e){
      var scrollHeight = $(document).height();
      var offset = $(document).scrollTop();
      console.log(scrollHeight);
      console.log(offset);
      if(scrollHeight - offset &lt;= 100){
          alert("here");
      }
  });
  </code></pre>
  
  <p>For some reason that I can not figure out it doesn't work. If I scroll to the bottom I would assume that the <code>height()</code> would equal <code>scrollTop()</code> but it doesn't, and here is what it shows:</p>
  
  <pre><code>scrollHeight = 1923
  offset = 998
  </code></pre>
  
  <p>Am I using the wrong methods for this?</p>