I'm looking for a lightweight solution (hopefully without jQuery but I'm open to suggestions) to 'lazy load' a long HTML page which is indexing tons of blog posts on the client-side. Most of the solutions out there are geared towards AJAX to load data from the server-side or handling pagination. I need to find something that would work with a single long page that's entirely loaded on the client side which is infinitely scrolling.
So HTML goes like this:
<div id="blog-post">
<h2 class="post-title">Cupcake ipsum.</h2>
<img class="post-image" src="img/posts/cupcakeIpsum.jpg">
<p class="preview">Cupcake ipsum dolor sit. Amet bear claw marzipan tootsie roll.</p>
<hr>
</div>
This identical excerpt basically repeats the same way again and again. I basically want to show 3 blog-posts in the beginning and once the scrolling reaches the bottom of the viewport, I want to unveil another set of 3 posts.
Any ideas on how I could achieve this with pure JavaScript? (ES6 possible.)