diff options
author | Chen Zhe <chenzhesg@gmail.com> | 2020-02-18 18:13:57 +0300 |
---|---|---|
committer | Chen Zhe <chenzhesg@gmail.com> | 2020-02-18 18:13:57 +0300 |
commit | f8a67e992d0c93a685ddf8c4b82964f21528d6eb (patch) | |
tree | d9af2de84d168a9737362865e38d8cfa840af8c1 | |
parent | 98a90bd0eb7c5bddabd936b1d2c636a9c185fade (diff) |
bump to latest jquery version
-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); |