Skip to content

Instantly share code, notes, and snippets.

@sealabcore
Created May 15, 2009 10:20
Show Gist options
  • Save sealabcore/112165 to your computer and use it in GitHub Desktop.
Save sealabcore/112165 to your computer and use it in GitHub Desktop.
<script language="javascript">
function checkScroll(url) {
if (nearBottomOfPage()) {
currentPage++;
new Ajax.Request(url+'page='+currentPage, {asynchronous:true, evalScripts:true, method:'get'});
} else {
setTimeout("checkScroll('"+url+"')", 250);
}
}
document.observe('dom:loaded', checkScroll);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment