Don't replace data-src with src in acl-template
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.
This commit is contained in:
parent
e05725fb44
commit
6a2bd8b29f
|
@ -253,10 +253,9 @@ ACL.prototype.populate = function(data){
|
||||||
//console.log(html);
|
//console.log(html);
|
||||||
that.list_content.append(html);
|
that.list_content.append(html);
|
||||||
});
|
});
|
||||||
$(".acl-list-item img[data-src]").each(function(i, el){
|
$(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){
|
||||||
// Replace data-src attribute with src attribute for every image
|
// Add data-src attribute with src attribute for every image
|
||||||
$(el).attr('src', $(el).data("src"));
|
$(el).attr('src', $(el).data("src"));
|
||||||
$(el).removeAttr("data-src");
|
|
||||||
});
|
});
|
||||||
that.update_view();
|
that.update_view();
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,10 +253,9 @@ ACL.prototype.populate = function(data){
|
||||||
//console.log(html);
|
//console.log(html);
|
||||||
that.list_content.append(html);
|
that.list_content.append(html);
|
||||||
});
|
});
|
||||||
$(".acl-list-item img[data-src]").each(function(i, el){
|
$(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){
|
||||||
// Replace data-src attribute with src attribute for every image
|
// Add data-src attribute with src attribute for every image
|
||||||
$(el).attr('src', $(el).data("src"));
|
$(el).attr('src', $(el).data("src"));
|
||||||
$(el).removeAttr("data-src");
|
|
||||||
});
|
});
|
||||||
that.update_view();
|
that.update_view();
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,10 +253,9 @@ ACL.prototype.populate = function(data){
|
||||||
//console.log(html);
|
//console.log(html);
|
||||||
that.list_content.append(html);
|
that.list_content.append(html);
|
||||||
});
|
});
|
||||||
$(".acl-list-item img[data-src]").each(function(i, el){
|
$(".acl-list-item[rel!=acl-template] img[data-src]").each(function(i, el){
|
||||||
// Replace data-src attribute with src attribute for every image
|
// Add data-src attribute with src attribute for every image
|
||||||
$(el).attr('src', $(el).data("src"));
|
$(el).attr('src', $(el).data("src"));
|
||||||
$(el).removeAttr("data-src");
|
|
||||||
});
|
});
|
||||||
that.update_view();
|
that.update_view();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user