Перейти до змісту

ГоловнаНовиниНовини ліцею

ТОЛОКА

ТОЛОКА

(function($){

// get the images of the gallery and replace it by a canvas of the same size to fix the problem with overlapping images on load. $('img[width][height]:not(.wk-overlay-panel)', $('#wk-grid72d')).each(function() {

var $img = $(this);

if (this.width == 'auto' || this.height == 'auto' || !$img.is(':visible')) { return; }

var $canvas = $('<canvas class="wk-responsive-width"></canvas>').attr({width:$img.attr('width'), height:$img.attr('height')}), img = new Image, release = function() { $canvas.remove(); $img.css('display', ''); release = function(){}; };

$img.css('display', 'none').after($canvas);

$(img).on('load', function(){ release(); }); setTimeout(function(){ release(); }, 1000);

img.src = this.src;

});

})(jQuery);

Фотогалерея (5 фото)