JSFiddle - React, Tailwind, and code Playground
by Milad Meidanshahi
HTML
<div id="container"><div class="loadedcontent"></div></div>
CSS
.loadedcontent {min-height: 1200px; }
JavaScript
var processing;
$(document).ready(function(){
$(document).scroll(function(e){
if (processing)
return false;
if ($(window).scrollTop() >= ($(document).height() - $(window).height())*0.7){
processing = true;
$.post('/echo/html/', 'html=<div class="loadedcontent">new div</div>', function(data){
$('#container').append(data);
processing = false;
});
}
});
});