LazyLoad plugin

I am using jQuery Lazy Load to load thumbnails on a page. I have a list of over 100 thumbnails per page. This plugin works perfectly until I introduce the Quick Pagination plugin to display nine thumbnails at a time and provide users with the next and previous.

When you click the Next or Previous button, you get an image with a gray placeholder because the Scroll page is no longer a factor.

I tried different events and even created my own, it only loads all the thumbnails, even those below the threshold in (next and previous).

Is it possible to trigger a scroll event? How did this person do> http://blog.3circlestudio.com/development/how-to-use-lazy-load-with-easy-slider-1-7/

I also tried and out of luck.

$('.thumbs').lazyload({ placeholder:'/thumbnail.gif' });

Without quick paging and scrolling jobs!

$('#thumbnails').paginate({ pager: $('div#pagination') });

The paginate view works to create a list of 9 thumbnails for each lazyload break. I assume that I ask and cannot understand how to call thumbnails every time I click the Next link.

+3
source share
4 answers

I just got it and it works! I created a function inside in quick pagination when the next and previous are called. In this function, I inserted the following.

var scrollTop = function() {
    $('html, body').animate({scrollTop:0}, 'slow', function() {
        $(window).trigger('scroll');
    });
}

, , , $(window).trigger('scroll'); . , - - .

!

+6

, 2 . lazyload scrollto . , , , lazyload

$('thumbs').lazyload({
    placeholder:'/thumbnail.gif',
    container:$('#thumbnails')
});
0

jquery LazyLoad FF3.6. Firebug, , .

JAIL, ( ). Net Firebug .

0
source

as shown here: fooobar.com/questions/349707 / ... use this to run lazyload

$(window).resize();
0
source

Source: https://habr.com/ru/post/1751752/


All Articles