#455·lazyload

How to use Lazyload with images in scrollable DIV? What is root for?

Author: q2aproCreated Sep 29, 2023Updated Oct 18, 2023

I have not a scrollable body, but a scrollable DIV.

Since the scrolling does not happen on the body, the lazyload images are not loaded.

I have seen:

new LazyLoad(images, {
     root: null,
     rootMargin: "0px",
     threshold: 0
});

But in the readme/doc there is not mentioned what root is.

Can I just define the div for root, e.g. root: $('.wrapper'),?