From fae77601f62d1868a0bdf18a7f13e08ecac64b62 Mon Sep 17 00:00:00 2001 From: kevinmwangi Date: Mon, 2 Jul 2018 14:38:32 +0300 Subject: [PATCH] Changing .load() to .on('load') since .load() is deprecated in jquery version 3 --- js/grid.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/grid.js b/js/grid.js index 21d5fd4..5c3772d 100755 --- a/js/grid.js +++ b/js/grid.js @@ -405,9 +405,12 @@ var Grid = (function() { // preload large image and add it to the preview // for smaller screens we don“t display the large image (the media query will hide the fullimage wrapper) + + // Changing .load() to .on('load') since .load() is deprecated in jquery version 3 + 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();