Tiny jQuery Image Lazy Load Plugin With Custom Placeholder Support - imagesDelay.js
File Size: | 31.3 KB |
---|---|
Views Total: | 1290 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

imagesDelay.js is a lightweight, cross-browser, high-performance jQuery image lazy load plugin for long web pages containing tons of large images. Placeholder images are supported as well.
How to use it:
1. Include the jquery.imagesDelay.js script on the webpage which has jQuery library included.
<script src="//code.jquery.com/jquery.min.js"></script> <script src="js/jquery.imagesDelay.js"></script>
2. Use the data-src
attribute for all lazy loading images, and the src
attribute for custom placeholder images.
<img data-src="1.jpg" src="placeholder.png">
3. Call the function to enable the lazy load functionality on your images.
$('.main img').imagesDelay();
4. Specify the offset to trigger the image loading event as you scroll down the webpage.
$('img').imagesDelay(-200); // -200px
This awesome jQuery plugin is developed by Rinyeo. For more Advanced Usages, please check the demo page or visit the official website.