<img id="img3" src="" data-src="/home/SeeImg?file=3032b808396a28022d760c464241c194.jpg" style="height:100px;min-width: 32px" />
!function (w) {
w.addEventListener('scroll', function () {
watchImgShow();
});
w.watchImgShow = function () {
var clientHeight = document.documentElement.clientHeight;
var scrollTop = document.documentElement.scrollTop;
var scrollHeight = clientHeight + scrollTop;
$("img[src='']").each(function (index, ele) {
var dom_offsetTop = $(ele).offset().top;
if (scrollHeight >= dom_offsetTop) {
console.log(ele);
console.log("scrollHeight=" + scrollHeight + ",dom_offsetTop=" + dom_offsetTop);
$(ele).attr("src", $(ele).attr("data-src"));
setTimeout(function (g) {
$(g).css("max-height", "100px");
$(g).css("height", "");
}, 100, ele);
}
});
}
watchImgShow();
}(window);