Detect if user has scrolled to the bottom of a div
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6271237/detecting-when-user-scrolls-to-bottom-of-div-with-jquery">Detecting when user scrolls to bottom of div with jQuery</a>  </p>
</blockquote>



<p>I have a page where I have a header, left menu, content, right menu and a footer. Inside my content I have a div (say id-foo) where I have some data. When user scrolls the page and reaches the bottom of div I have to make an ajax call and bring more data to fill the content there. How can I detect that user has scrolled(page scroll, there is no scroll in div) to bottom of div (foo) .</p>
