is it possible to disable lazyload (so all images gets loaded..)?
Solution 1
thanks for stopping by.. i now took the event from the lazyload machinery itself.
$('#images img').each(function() {
$(this).attr("src", $(this).attr("original"));
});
so i just alter the images, like lazyload does it itself.
Solution 2
Or you could just trigger the event you configured Lazy Load in the first place with.
$("img.lazy").lazyload({
event : "click"
});
$("img.lazy").trigger("click");
![honk31](https://i.stack.imgur.com/6lTkF.jpg?s=256&g=1)
honk31
Updated on September 03, 2022Comments
-
honk31 almost 2 years
i have a site using jquery lazyload
its working fine, but now i want to be able to disable this function. the reason is, that you can normally scroll through the images, which is fine, but i also do have a navigation, where you can jump to a certain image. now when lazyload is active, the browser jumps to the wrong place, i guess thats because lazyload also loads some previous images, so the intentional image gets displaced..
so i want to disable lazyload, if the subnavigation is active.. something like unbind..? any chance?
the thing is, that both methods need to work. like when click on an image, scroll to the next one (and use lazyload). but when activating the "preview images" (they are hidden upfront, so this would be possible, i guess), stop lazyload and load all images.
-
Tyde over 13 yearsJust remove the line where you load the lazyload JavaScript.
-
honk31 over 13 yearsnope, thats doin it wrong.. (will cause in error, like function lazyload is not defined, or is not a function). PLUS all content gets loaded via ajax so i only load the head once.
-
justkt over 13 yearsthis question needs more information, such as the code you are using where you utilize lazyload.
-