Here's a possible way to do this based on the example shown here to find out if you are scrolling down. It checks every second to see if it sends a POST request for a new "page". You can add things like setting the interval on the mouseenter and clearing it on the mouseleave so that it doesn't check every second on your page, but this should give you the basic idea.
JS:
var checkBottom, page = 1; function ifBottom(){ var cont = $('#container'); if(cont.scrollHeight - cont.scrollTop() == cont.outerHeight()){ page = page++; $.post('example.php', {pg: page}, function(html){ cont.append(html); }, 'html'); } }); $(document).ready(function(){ checkBottom = setInterval(ifBottom(), 1000); });
munch source share