Reputation: 41
I tried all the solution given on stackoverflow.
LazyLoad images not appearing until after a scroll
Add a width height in css
Add a width height in HTML
$(window).resize();
.trigger("lazyload");
skip_invisible:true
failure_limit : 1000
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
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