- clone repo
- click index.html or load it from any browser.
- scroll down for magic times.
To use simpleIO to lazy load images, simple append or create an image with an id='lazy-img'. You can change this setting in simpleIO.js line 3 to whatever you want.
This is a really simple example for how to use intersection observer to do a multitude of really cool things, but mostly for lazy-loading images without some bulky project that ends up not working.
I don't promise any pulls to this repo unless it is something really worthwhile. I want to keep this simple, as everything on the internet for lazy-loading images is really bad and works poorly/is hard to scale/hard to manipulate the code or figure out what is even going on.