$(window).scroll(function() {
var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop),
scrollHeight = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
if(scrollTop === scrollHeight - this.innerHeight) {
$('#show_more').click();
}
});
|