0.0.2 • Published 9 years ago

lazy-load v0.0.2

Weekly downloads
21
License
MIT
Repository
github
Last release
9 years ago

Lazy Load NPM version

Efficient and small, load your images lazily without messy jQuery plugins.

Required DOM Structure

<img src="/baz.png"> <!-- will not be lazy loaded -->
<img class="lazy-load" data-src="/foo.png">
<img class="lazy-load" data-src="/bar.png">

Initialization

lazyLoad.init( imageSelector, imageSourceAttribute );

Initializes lazy load. Can optionally pass in:

imageSelector

The class representing the image/images that you would like to lazy load ( .lazy-load by default ).

imageSourceAttribute

Attribute on the image element that holds the image source ( data-src by default ).