SkillAgentSearch skills...

Jquery.lazyimg

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

Install / Use

/learn @huacnlee/Jquery.lazyimg
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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/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>

Build

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

License

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

View on GitHub
GitHub Stars23
CategoryDevelopment
Updated5y ago
Forks3

Languages

CoffeeScript

Security Score

60/100

Audited on Dec 8, 2020

No findings