Licence
MIT
Version
1.0.7
Deps
0
Size
17 kB
Vulns
0
Weekly
0
vanilla js based image-lazy-loader
This library for loading images as lazy
And this library based on Vanilla JS and built from typescript
So, there is advantage you can use with javascript, AngularJS-1, Angular2 (or above),ReactJs, VueJs and more
Please see in the EXAMPLE / DEMO
Installation
npm i vanilla-js-image-lazy-loader
Clone or Download all file in your lib(any folder)
How to use ?
HTML Code :
__CODE_BLOCK_0__
typescript/reactjs/angular based Code :
import {VanillaLazyImage} from 'vanilla-js-image-lazy-loader';
const name = new VanillaLazyImage();
OR Core javascript code
<script src="dist/image-lazy-loader-vanilla.js"></script>
<script>
new VanillaLazyImage(".blog img.lazy").applyLazyLoader();
// OR
var vanillaLazyImageObj = new VanillaLazyImage();
vanillaLazyImageObj.selectorName=".blog img.lazy";
vanillaLazyImageObj.applyLazyLoader();
<script>