diff options
-rw-r--r-- | layouts/partials/scripts.html | 2 | ||||
-rw-r--r-- | 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 @@ - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> + <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.min.js"></script> <script src="{{ "js/main.js" | absURL }}"></script> 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(); - $( '<img/>' ).load( function() { + $( '<img/>' ).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); |