marc094
marc094

Reputation: 41

Why doesn't Lazyload show pictures?

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?

Upvotes: 4

Views: 1840

Answers (1)

rrugbys
rrugbys

Reputation: 282

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);

Upvotes: 0

Related Questions