From 6834bd716c5d1bc885589e31abf072c36809f532 Mon Sep 17 00:00:00 2001 From: Frank Cheung Date: Wed, 19 Apr 2023 08:53:31 +0000 Subject: [PATCH] =?UTF-8?q?update=20server/src/main/resources/static/js/la?= =?UTF-8?q?zyload.js.=20=E7=A7=BB=E9=99=A4=E5=85=A8=E5=B1=80index=E5=8F=98?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E9=98=B2=E6=AD=A2=E5=8F=98=E9=87=8F=E6=B1=A1?= =?UTF-8?q?=E6=9F=93=E5=BC=95=E5=8F=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Frank Cheung --- server/src/main/resources/static/js/lazyload.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/main/resources/static/js/lazyload.js b/server/src/main/resources/static/js/lazyload.js index 4296d46d..e36cf62b 100644 --- a/server/src/main/resources/static/js/lazyload.js +++ b/server/src/main/resources/static/js/lazyload.js @@ -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])) {