From f8a67e992d0c93a685ddf8c4b82964f21528d6eb Mon Sep 17 00:00:00 2001 From: Chen Zhe Date: Tue, 18 Feb 2020 23:13:57 +0800 Subject: bump to latest jquery version --- layouts/partials/scripts.html | 2 +- static/js/main.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 585b2ec..fb7c927 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,2 +1,2 @@ - + diff --git a/static/js/main.js b/static/js/main.js index 5cd7662..124131f 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -345,7 +345,7 @@ var Grid = (function() { if( self.$fullimage.is( ':visible' ) ) { this.$loading.show(); - $( '' ).load( function() { + $( '' ).on("load", function() { var $img = $( this ); if( $img.attr( 'src' ) === self.$item.children('a').data( 'largesrc' ) ) { self.$loading.hide(); @@ -462,7 +462,7 @@ document.addEventListener("DOMContentLoaded", function() { entries.forEach(function(entry) { if (entry.isIntersecting) { var image = entry.target; - $(image).load(function(){ + $(image).on("load", function(){ image.classList.remove("lazy"); image.style.removeProperty("width"); }).attr('src', image.dataset.src); -- cgit v1.2.3