This project is forked from tuupola/jquery_lazyload and add features below:
* Many Details for improve performance;
* IE6/7 support;
* Available with Zepto;
* `vertical_only` \ `minimum_interval` \ `use_minimum_interval_in_ios` \ `no_fake_img_loader` options.
More information on jieyou/lazyload.
Somethins, you need do something with the original url, See the example code below. We changed the first image's url to another.
$("img.lazy").lazyload({ url_rewriter_fn:function($element,originalSrcInAttr){ // this -> image element if(originalSrcInAttr == 'img/bmw_m1_hood.jpg'){ // in the example, we changed the first image's url to another return 'img/bmw_m1_hood_rewritten.jpg' } return originalSrcInAttr } });
<img class="lazy" data-original="img/example.jpg" width="765" height="574">