From df3afc90a77486fa7fc6b40172482c03185340ce Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 20 Nov 2023 16:54:05 +0100 Subject: [PATCH] fix: pleeeeaase work! --- static/lazy.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/lazy.js b/static/lazy.js index 9f8e4e6..bee6e3b 100644 --- a/static/lazy.js +++ b/static/lazy.js @@ -6,11 +6,13 @@ window.onload = function () { lazyImages.forEach(function (lazyImage) { lazyImage.style.opacity = 0; lazyImage.classList.add("lazy-image") + console.log(lazyImage) // Create an image element to check when it's loaded var img = new Image(); img.src = lazyImage.src; img.onload = function () { + console.log("lloooaded") lazyImage.style.opacity = 1; }; });