🗻 A very lightweight jQuery plugin to lazy load images
JavaScript HTML CSS
Clone or download
Pull request Compare This branch is 107 commits ahead of luis-almeida:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
docs Version bump. Dec 16, 2016
src
test Fix test container position Jan 24, 2017
.codeclimate.yml
.gitignore
.travis.yml node.js versions Aug 24, 2016
README.md
bower.json
gruntfile.js Disabled Sauce Labs for now (fixes Travis builds). Dec 16, 2016
package.json

README.md

Travis Code Climate npm Bower jsdelivr cdnjs

unveil2.js

A very lightweight plugin to lazy load images for jQuery
Based on luis-almeida/unveil.

Getting started

Install unveil2.js by downloading a copy of jquery.unveil2.min.js and add it to your page after jQuery:

<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="jquery.unveil2.min.js"></script>

And call the unveil plugin on the images you want to be lazily loaded:

$('img').unveil();

Note: If you load scripts at the bottom of the page, you don't have to wait for $.ready.

That's all folks!

More examples

CSS background, retina images, breakpoints and more: see online examples.

More configuration options

For a complete list of options, see API section.

Cross-browser tests

Sauce Labs

License

MIT