JSFiddle - React, Tailwind, and code Playground
HTML
<div id="container"></div>
CSS
#container {
border:1px solid #000;
margin:10px;
}
.content {
background:#ddd;
width:100%;
height:200px;
margin-bottom:20px;
}
JavaScript
var curr_y = $(window).scrollTop(),
cont = '';
setInterval(function () {
cont = $('<div class="content">foo ' + Math.random() + '</div>');
$("#container").prepend(cont);
$(window).scrollTop(curr_y + cont.outerHeight(true));
}, 1400);
$(window).scroll(function () {
curr_y = $(window).scrollTop();
});