New version of Lazyload?

Does anyone know of a different plugin than Lazyload from Applesiini? http://www.appelsiini.net/projects/lazyload

They stopped working on it, so it does not work in new browsers. I am looking for an alternative.

I need it to just not upload images until the user scrolls to it (but the code is already loaded, so Ajax does not load the new content). If you think it's easy to program, I more than welcome any help.

Thank.

+3
source share
3 answers

Use this jQuery code to initiate an Ajax call when a page scrolls past a specific element:

$("body").bind("scroll touchstart touchend",function(){
    if($("body").scrollTop()>=$("#something").offset().top){
        alert("Put an Ajax call here...");
    }
});

#something jQuery , .

Ad @

0

. in-viewport lazyload , , , rel, URL- .

visiblity: hidden display: none , hide, visibility fadeIn.

, , animate.

jsFiddle

+1

You might want to check the plugin page again. It has recently been updated. Especially a demo page using the scrollstop event . This event is not provided by default. Code taken from James Padolseys excellent special scroll events for jQuery .

+1
source

All Articles