scroll to bottom detection jquery
if (($(window).innerHeight() + $(window).scrollTop()) >= $("body").height()) {
//do stuff
}
$('#target').scroll(function(e) {
if (myDiv.offsetHeight + myDiv.scrollTop >= myDiv.scrollHeight) {
....
}
});