Possible Duplicate:
Detecting when user scrolls to bottom of div with jQuery
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) .