I have a Backbone.js application with require.js, underscore.js. And now I want to use jquery lazy loading plugin with the Eislider banner.
The banner works well before applying the lazy loading script.
This is how I did in my backbone view :
render: function(options){
var _banner = _.template(BaTem);
var homebanner = new ProWeb();
homebanner.getPrCallBack(this.options.type, function(result) {
$(this.el).html(_banner({type : this.options.type,result:result}));
$("img.lazy").lazyload({
event : "click"
});
}.bind(this));
return this;
}
Here is the template in html file by using text.js
<ul class="ei-slider-large">
<li>
<img class="lazy" data-original=images/05056ba1e25.png" alt="slide show" width="640" height="480"/>
<a href="#itemDet">
<img class="lazy" data-original=images/05056ba1e25.png" alt="slide show" width="640" height="480"/>
</a>
<a href="#item">
<img class="lazy" data-original=images/05056ba1e25.png" alt="slide show" width="640" height="480"/>
</a>
</li>
</ul>
After applying lazy loading script, the images are stop showing.
Any idea what could be causing this.