title: How to calculate end a div scroll on chrome?
body: <p>I have a div tag with a height of 100 pixels and overflow-y is set to auto. I have written some jquery code that checks to see if the scroll has reached all the way at the bottom. I am using this for a inifite scroll project I am working on. </p>
  
  <p>This it seems to work fine for Firefox, but not for Chrome. Anybody might have an idea why it's not working for Chrome?</p>
  
  <p>Below is my code. </p>
  
  <pre><code>&lt;script&gt;
  
  $( "#scroll" ).scroll(function() {
  
      var content = $(this).scrollTop() + $(this).innerHeight();
  
      if (content == $(this)[0].scrollHeight) {
  
          // $( "span" ).css( "display", "inline" ).fadeOut( "slow" );
          console.log("reach end");
  
      }
  });
  
  
  
  &lt;/script&gt;
  
  
          &lt;style&gt;
          #scroll{
  
    max-height: 100px;
    overflow-y: auto;
    width: 647px;
    margin: auto;
          }
      &lt;/style&gt;
  
  
  &lt;div id='scroll'&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  &lt;p&gt;hello world&lt;/p&gt;
  
  &lt;/div&gt;
  </code></pre>