$(window).scroll(function(){<br>
<br>
if ($(window).scrollTop() == $(document).height() - $(window).height()){<br>
<br>
alert('bottom');<br>
<br>
}<br>
<br>
})<br>
if($(window).scrollTop() > $(document).height() - $(window).height() - 50) ...