<div class="products">
<ul class="product-set">
<li class="product">
<img data-src="/path/to/image.jpg" width="170" height="300" class="ctg-lazyload-img" />
<noscript>
<img src="/path/to/image.jpg" width="170" height="300" />
</noscript>
</li>
<li class="product">
<div data-src="/path/to/image.jpg" class="ctg-lazyload-img"></div>
<noscript>
<div style="background-image: url('/path/to/image.jpg');"></div>
</noscript>
</li>
</ul>
</div>
// doc ready
$('.products').lazyload();
jQuery selector used to match img elements within element.
Images that appear below the window height + offset will be loaded in.
Sets the speed of image fade.
Callback runs as each image has loaded. The loaded image/element is passed to this function.
When set to true the lazyload widget will be destroyed once the page has been scrolled to the bottom.
Refreshes internally calculated offsets of images, passing in live as true will re-query the DOM for images.
Cleans up after itself by unbinding scroll events etc.