Lazyload image plugin for jQuery. This project is fork from jquery.unveil, to improve performance with huge DOMs.
- Lazyload images;
- Retina display support;
- Only 2 events binding (scroll, resize for responsive), even you call
lazyimg()
over again and again; - No events binding on IMG elements;
- Very small, just 1.3 Kb (not compress);
- Very fast;
- Responsive page support.
You can see all of the release notes in here: Release notes
- Safari
- Chrome
- Firefox
- IE6+
You can try the Demo app.
<img class="lazy" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="https://foo.bar/item1.jpg" data-src-retina="https://foo.bar/item1@2x.jpg" />
<img class="lazy" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="https://foo.bar/item2.jpg" data-src-retina="https://foo.bar/item2@2x.jpg" />
<script type="text/javascript">
$("body").lazyimg();
</script>
$ bundle install
$ rake watch # or use "rake build" to release
Apache V2 : https://choosealicense.com/licenses/apache