I am building a blog type page, and I want to load items into the page as the user scrolls down, much like Google Reader, or Soup.io. How would you go about achieving this effect? I've seen some examples which read the height of the page, and have an onScroll even attached to the window so that as the user scrolls down we can test to see if they've scrolled down far enough to warrant loading more items. Soup.io's implementation seems to remove the old items as you scroll down so that the browser isn't dealing with an ever-increasingly large DOM tree. Which javascript libraries would be best suited to this task?
Asked
Active
Viewed 6,946 times
2 Answers
3
Unspace had an article demonstrating this functionality: Endless Pageless: No More Next Page. Their demonstration page is here (dead, for reference).
This particular example uses RoR and Prototype.

drac_o
- 427
- 5
- 11

Ryan Duffield
- 18,497
- 6
- 40
- 40
-
"Works for me" -- Firefox 3.0.3. – Ryan Duffield Oct 08 '08 at 18:58
-
Make sure you click "View Results" to see the endless page functionality. – Ryan Duffield Oct 08 '08 at 18:59
-
I get: Application error (Apache) Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html – Diodeus - James MacFarlane Oct 08 '08 at 20:36
2
Thy this jquery example http://webdeveloperplus.com/jquery/create-a-dynamic-scrolling-content-box-using-ajax/

Binyamin
- 7,493
- 10
- 60
- 82