update server/src/main/resources/static/js/lazyload.js.

移除全局index变量,防止变量污染引发问题

Signed-off-by: Frank Cheung <frank.cheung.work@outlook.com>
pull/94/head
Frank Cheung 2 years ago committed by Gitee
parent 0aabf831ba
commit 6834bd716c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -6,9 +6,10 @@ function isInSight(el) {
return bound.top <= clientHeight + 100;
}
var index = 0;
function checkImgs() {
var index = 0;
var imgs = document.querySelectorAll('.my-photo');
for (var i = index; i < imgs.length; i++) {
if (isInSight(imgs[i])) {

Loading…
Cancel
Save