Lazy load on MULTIPLE horizontal containers

I am using the lazy Load jQuery plugin:

http://www.appelsiini.net/projects/lazyload

My question is:

Is it possible to have several containers for scrolling, each of which contains lazyload images, for example:

$("#container1 img.lazy").lazyload({ container: $("#container1")}); $("#container2 img.lazy").lazyload({ container: $("#container2")}); 

When I do this, it seems to be tracking the just called last.

I tried to call the function twice (one for each container), but it did not work, I also tried to call both containers as follows: container: $ ("# container1, # container2")}); and did not work.

I really tried a lot of things, but I can't do it.

Thanks so much for reading.

+1
source share

Source: https://habr.com/ru/post/919939/


All Articles