From 975fa19467d70620aa3ebf0c9b13a9fa9f60d53d Mon Sep 17 00:00:00 2001 From: Alex Dong Date: Fri, 10 Jul 2020 16:06:11 +0700 Subject: [PATCH] Update config.xml --- etc/config.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/etc/config.xml b/etc/config.xml index 6aa427c..3c1eb23 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -23,12 +23,22 @@ imgLazy.lazyload(); imgLazy.on('load',function(){ var img = $(this); + if(img.hasClass( "loaded" )) return; if(img.attr('src') == img.data('src')){img.addClass('loaded');} else {img.lazyload();} if($.equalheight) $.fn.equalheight(); }); - if($.equalheight) $.fn.equalheight();}); - $('body').on('contentUpdated', function () {$(this).find("img.lazyload").not(".loaded").lazyload();}); + $('body').on('contentUpdated', function () { + var lazy = $(this).find("img.lazyload").not(".loaded").lazyload(); + lazy.on('load',function(){ + var img = $(this); + if(img.hasClass( "loaded" )) return; + if(img.attr('src') == img.data('src')){img.addClass('loaded');} + else {img.lazyload();} + if($.equalheight) $.fn.equalheight(); + }); + }); + $('body').removeClass('loading_body'); }); ]]>