All Projects → huacnlee → jquery.lazyimg

huacnlee / jquery.lazyimg

Licence: other
Image lazy load plugin for jQuery, fork from jquery.unveil to improve performance with huge DOMs.

Programming Languages

coffeescript
4710 projects
ruby
36898 projects - #4 most used programming language

jquery.lazyimg

Lazyload image plugin for jQuery. This project is fork from jquery.unveil, to improve performance with huge DOMs.

Feature

  • 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.

Changelogs

You can see all of the release notes in here: Release notes

Browser support

  • Safari
  • Chrome
  • Firefox
  • IE6+

Demo

You can try the Demo app.

Usage

<img class="lazy" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="https://foo.bar/item1.jpg" data-src-retina="https://foo.bar/[email protected]" />
<img class="lazy" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-src="https://foo.bar/item2.jpg" data-src-retina="https://foo.bar/[email protected]" />
<script type="text/javascript">
$("body").lazyimg();
</script>

Build

$ bundle install
$ rake watch # or use "rake build" to release

License

Apache V2 : https://choosealicense.com/licenses/apache

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].