Follow the following code snippet
There are some properties/methods you can use:
$().scrollTop()//how much has been scrolled
$().innerHeight()// inner height of the element
DOMElement.scrollHeight//height of the content of the element
So you can take the sum of the first two properties, and when it equals to the last property, you've reached the end:
jQuery(function($) {
$('#flux').bind('scroll', function() {
if($(this).scrollTop() + $(this).innerHeight() >= this.scrollHeight) {
alert('end reached');
}
})
});
or
$(document).ready(function() {
$('#btm').bind('scroll', function()
{
if($(this).scrollTop() + $(this).innerHeight() >= this.scrollHeight)
{
alert('end reached');
}
});
});