title: Loading data when the scroll reaches top of a div
body: <p>Iam using infinte scroll for pagination.The data is loading only when the scroller reaches the bottom of the page while using below code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>`$(window).scroll(function() {
      if($(window).scrollTop() == $(document).height() - $(window).height()) {
          //Run the ajax call or other here
      }
  });`</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want to load data when scroller reaches the top of my footer div</p>