Jun 29, 2014 in Animation 3029 views
jQuery LazyImage is a simple and lightweight plugin to lazily load images.
Source: github.com
1. INCLUDE JS FILES
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> <script src="jquery.lazyimage.js"></script>
2. HTML
<img class="lazy-image" data-src="/path/to/image" /> <img class="lazy-image" data-src="/path/to/image" /> <img class="lazy-image" data-src="/path/to/image" /> ...
3. JAVASCRIPT
$('.lazy-image').lazyImage();
Tagged with:
jquery lazyimage
lazily load images
loading
load images
lazyimage
Related Articles