@vistro/lazy-elements
v0.0.1
Published
Script for lazy loading elements
Downloads
1
Readme
Scripts for lazy loading elements
Lazy IMG
Add lazy-img.js
and replace <img>
tag with <lazy-img />
.
Example:
<delayed-img src="https://dummyimage.com/1024x512/000/fff"></delayed-img>
//somewhere in footer
<script src="lazy-img.js"></script>
Lazy iFrame
Add lazy-iframe.js
and replace <iframe />
tag with <lazy-iframe />
.
Example:
<delayed-iframe allowfullscreen src="https://www.youtube.com/embed/6f0y1Iaorug"></delayed-iframe>
//somewhere in footer
<script src="lazy-iframe.js"></script>