JSFiddle - React, Tailwind, and code Playground
by rushijogle
HTML
<ul id="slideCell" class="cell-set">
</ul>
CSS
.cell-set {
position:relative;
}
.windowTiles {
width:980px;
height:250px;
border:1px solid #FFC0CB;
}
.cell-0 {
background-color:grey;
}
JavaScript
function createDiv() {
for (j = 0; j < 4; j++) {
$("#slideCell").append("<li class='cell-" + j + " windowTiles'> " + j + " </li>");
}
scrollFun()
}
function scrollFun(e) {
$(window).scroll(function () {
console.log(TileHeight);
console.log(_top);
if ($(document).height() <= $(window).scrollTop() + $(window).height()) {
createDiv();
}
});
}
dell()