
Just another JavaScript library which makes uses of the Intersection Observer API to provide the fast, performant and modern lazy loading functionality on your images within the document. Supports both <img> tags and background images.
How to use it:
Install and import the LazyObserver.js library into your document.
# NPM $ npm install lazyobserver --save
<script src="/path/to/LazyObserver.js"></script>
Initialize the lazyobserver library and specify the selector of the container which contains images and/or background images.
// default .lazyObserver
new LazyObserver('.lazyObserver');Default configs.
new LazyObserver('.lazyObserver',{
root: null,
rootMargin: '0px 0px 0px 0px',
threshold: 1.0,
mounted: null,
loaded: null,
error: null
});






