tuupola / lazyload

Vanilla JavaScript plugin for lazyloading images
https://appelsiini.net/projects/lazyload/
MIT License
8.76k stars 2.24k forks source link

jQuery lazyload not working on window scroll but on window resize #292

Open mattiaband opened 8 years ago

mattiaband commented 8 years ago

Hi, I am using jquery lazyload on one of my pages. the images doesn't appear on scroll, but if I resize the window the images appear. I noticed that if I delete this css rule: html,body{ height: 100%; } works, but I really need this for other stuff. any ideas?

another question, is this script cross browser? i was looking for the browser compatibility, but I can't find anything.

digitalgutenberg commented 7 years ago

I was having the exact same problem, and I can confirm that this still is an issue. Images below the fold wouldn't show up unless I resized the browser window. Deleting "height: 100%" worked for me too.

I've been trying to figure this out the entire afternoon, I'm really thankful that you pointed me in the right direction, @mattiaband !

Tjitse-E commented 7 years ago

Thanks @mattiaband this also solved the problem for me.

Colmea commented 7 years ago

Hello,

@mattiaband @digitalgutenberg Did you find a workaround ? I need a "height:100%" in my CSS, so remove this style is not an option for me.

V2LT commented 7 years ago

Hello guys, I have kind of same issue here. The images are loaded only when viewport is resizing, even after removing the body's "height:100%". If one of you found a solution, feel free to share :) Cheers!