Jquery lazyload with ajax

后端 未结 8 1647
-上瘾入骨i
-上瘾入骨i 2021-01-17 23:26

I use lazyload() on my ecommerce website. lazyload() works great. I use this code to do that:

$(function(){
  $(\"img.lazy\").lazyload({ 
  effect : \"fadeIn         


        
8条回答
  •  孤城傲影
    2021-01-18 00:08

       $(document).ajaxStop(function() {$('.loading').removeClass('in');
        $("img.lazy").lazyload({
                    effect: "fadeIn",
                   container: $("#scrollable"),
                   threshold: 100,
                })
    
          });
    

    works for ajax images. but however, not showing the first image by default. the update is not triggered.

提交回复
热议问题