No, I canβt remember the site on which there is such a system as you describe. But I made a small function that should mimic what you want to achieve pretty well.
There is a demo here where you can see the code live.
How the code works
1). Define a variable that tracks the current offset at the top of the document, for example:
var curr_y = $(window).scrollTop();
2). Update the value of the current offset at the top of the document every time the user scrolls:
$(window).scroll(function () { curr_y = $(window).scrollTop(); });
3). Use your function to retrieve the data, and then use this code to add to the container, and then scroll down to where it used to be:
cont = $('<div>your-content'); $("#container").prepend(cont); $(window).scrollTop(curr_y + cont.outerHeight(true));
source share