Q: Display div in HTML on demand I have a javascript which fetches thousands of records from some http server. These records are then displayed in HTML by adding div. Now, instead of fetching and adding all the records on initial pageload, I want to load them as and when user scrolls down. So, initially as many records are fetched and displayed as there is space on the window. And, when user scrolls down, more divs are added and previous divs are removed (or reused) and so on. How can I do this? Any suggestions are welcome.

A: Well first you need a plugin/script to do infinite scroll
then build a query for your http server which only return the requested number of records and call it with ajax. What Else?
