A very lightweight jQuery plugin to lazy load images
The default usage is pretty simple:
Include your images, replace the
src-attribute with an image-placeholder and use the
data-src-attribute for your real image.
<img src="holder.png" data-src="img.jpg">
noscript-tag after your image:
<noscript> <img src="img.png"> </noscript>
Now you've just to initialize "lately"
By default, images are only loaded and "unveiled" when user scrolls to them and they became visible on the screen.
If you want your images to load earlier than that, lets say 200px before they get visible, you just have to:
container: window- The scrolling container
gapX: 0- The horizontal threshold
gapY: 0- The vertical threshold