Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Chen-Zhe/photo-grid.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/main.js')
-rw-r--r--static/js/main.js4
1 files changed, 2 insertions, 2 deletions
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);