Why doesn't Lazyload show pictures?

1.7k views Asked by At

I tried all the solution given on stackoverflow.

I also tried an alternative http://luis-almeida.github.io/unveil/

But the problem still the same. Unless I resize the window, (or $(window).resize(); in the console) picture don't show. However, if I put a threshold of 300, the pictures in the 300 first pixels will appear, not the others...

The most strange is that the problem is the same for the 2 plugins.

Any suggestion?

1

There are 1 answers

0
rrugbys On

This is an issue because your content, which contains the images, is loaded after the lazyload

Try calling lazyload in setInterval function or at the end of window.load.

var interval = setInterval(function(){
    $("img.lazy").lazyload();
    clearInterval(interval);
},1000);