Lazyload images and background images based on viewport visibility, in vanilla JS

Scroll down to witness the 60fps lazyloading goodness

Configuration? None. Just include data-src as an attribute on whatever is an image or needs a background image and... well, that's it.

Code by A. M. Douglas, a freelance web developer in Leeds, UK

Source on Github