On pageload an empty acl-list-item as template is created and not yet replaced.
Don't change the data-src for src attributes in those images.
//console.log(html);
that.list_content.append(html);
});
- $(".acl-list-item img[data-src]").each(function(i, el){
- // Replace data-src attribute with src attribute for every image
+ $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){
+ // Add data-src attribute with src attribute for every image
$(el).attr('src', $(el).data("src"));
- $(el).removeAttr("data-src");
});
that.update_view();
}
//console.log(html);
that.list_content.append(html);
});
- $(".acl-list-item img[data-src]").each(function(i, el){
- // Replace data-src attribute with src attribute for every image
+ $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){
+ // Add data-src attribute with src attribute for every image
$(el).attr('src', $(el).data("src"));
- $(el).removeAttr("data-src");
});
that.update_view();
}
//console.log(html);
that.list_content.append(html);
});
- $(".acl-list-item img[data-src]").each(function(i, el){
- // Replace data-src attribute with src attribute for every image
+ $(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){
+ // Add data-src attribute with src attribute for every image
$(el).attr('src', $(el).data("src"));
- $(el).removeAttr("data-src");
});
that.update_view();
}