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 ofjquery.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!