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.

Revisions

  1. sealabcore created this gist May 15, 2009.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    <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>