Closed ollie007 closed 9 years ago
If I remember rightly, it was to make loading states easier. Should just be a coupe of tweaks to the loadImage method in the js.
loadImage: function(image) {
var el, img,
_this = this;
el = $("[data-src='" + image.og_src + "']");
img = $("<img />");
img.attr("src", image.src).attr("alt", el.attr("data-alt")).attr('data-src',image.og_src).attr('data-alt', el.attr("data-alt"));
img.load(function() {
el.replaceWith(img);
img.addClass('img-loaded');
});
}
Something like that would do it. Could be more efficient, but it'll work I think (Not tested)
Why not use SRC and DATA-SRC in the IMG tag?
is it easy to change it?