LightLazyLoader is a lightweight lazy loading image script (less than 1.7KB). It lets you lazy load and multi-serve your images so you can save bandwidth and server requests. DEMO
- No dependencies - You only need to include script with LLI nothing more.
- Detecting CSS3 transition/transforms and Attributes change - Your old Lazy Image Plugin won't work with your great new slider or you need to write extra callbacks to get it to work? No worries LLI will handle that - no callbacks.
- Dynamic elements support - You're adding new images via AJAX ? No worries. LLI is looking for mutations in your DOM.
- CSS3 icon - No extra requests for gif with placeholder image.
- Is simple - look at the source ;-)
- In case you need to load images from custom event. Run
window.LLIistance.checkElements();
What you need to do:
<img src="http://your.url.to/image.jpg" class="your class" />
replace with
<span data-src="http://your.url.to/image.jpg" class="your class lazy-load"></span>
- If you want you can write fancy styles.
- Refresh your website and enjoy your lazy images.
MIT