fix: lazy loading
This commit is contained in:
parent
871c6d6959
commit
a8cf13157b
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// Loop through each image and apply the fade-in effect
|
// Loop through each image and apply the fade-in effect
|
||||||
lazyImages.forEach(function (lazyImage) {
|
lazyImages.forEach(function (lazyImage) {
|
||||||
console.log(lazyImage)
|
lazyImage.classList.add('lazy-image');
|
||||||
var img = new Image();
|
var img = new Image();
|
||||||
img.src = lazyImage.src;
|
img.src = lazyImage.src;
|
||||||
img.onload = function () {
|
img.onload = function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user