Implementing Infinite Scroll
 

Implementing Infinite Scroll

Infinite Scroll features on many websites. It is the ability to display what appears to be am un-ending display of content in a window (container) on the screen by the method of scrolling the container or page.

I started out reacting to the news media's reaction to how Social Media and Big Tech are the "evil players" in all this. A common solution put forward is to disable Infinite Scroll and Auto-Play on the platforms that are hosting all the material that is causing the younger generation to do all the bad things.

infinite-scroll.com seem to offer code to implement Infinite Scroll on your website. To do this you need to use jQuery.

Top

I am not sure that I want to implement Infinite Scroll on this website. However, my nature is that I wiil probably look further into this.

The implementation

Infinite Scroll seens to be a container that has a class that is defined in infinite-scroll.pkgd.min.js

<script src="/path/to/infinite-scroll.pkgd.min.js"></script>

Infinite Scroll works on a container element with item elements.

The container

<div class="container">
  <article class="post">...</article>
  <article class="post">...</article>
  <article class="post">...</article>
  <article class="post">...</article>
</div>

The code needs to be looked at in greater detail.............

Links

Link to PDF Disabled

If you require a copy please email tempusfugit.me.uk

Top

References -

  • 1 - infinite-scroll.com - https:// infinite-scroll.com/ - has code and examples of how this is done
  • 2 - API - https://infinite-scroll.com/api
  • 3 - Masonry Demo - https://infinite-scroll.com/demo/masonry/