From 626c374dc3f412d481ebc56386ab7f6bdd05b5e9 Mon Sep 17 00:00:00 2001 From: zuber Date: Tue, 18 Aug 2009 00:09:45 +0200 Subject: [PATCH 1/1] =?utf8?q?Dopracowanie=20leniwego=20do=C5=82adowywania?= =?utf8?q?=20stron=20(problemy=20s=C4=85=20w=20momencie,=20kiedy=20skan=20?= =?utf8?q?strony=20jest=20wy=C5=BCszy=20od=20przygotowanej=20dla=20niego?= =?utf8?q?=20warstwy).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- project/static/js/jquery.lazyload.js | 8 +++++++- project/templates/explorer/folder_images.html | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/project/static/js/jquery.lazyload.js b/project/static/js/jquery.lazyload.js index 25c94869..ea3de6ff 100644 --- a/project/static/js/jquery.lazyload.js +++ b/project/static/js/jquery.lazyload.js @@ -31,7 +31,13 @@ || belowViewport(container, this, settings.threshold)) { $(this).html(settings.placeholder); } else { - $(this).html(''); + $(this).html(''); + var self = this; + $('').load(function() { + if ($(this).height() > $(self).height()) { + $(self).height($(this).height()); + } + }).appendTo(this); } }) } diff --git a/project/templates/explorer/folder_images.html b/project/templates/explorer/folder_images.html index e6beb076..4104926a 100644 --- a/project/templates/explorer/folder_images.html +++ b/project/templates/explorer/folder_images.html @@ -1,5 +1,5 @@ {% for image in images %} -
+

{{ image }}

{% endfor %} \ No newline at end of file -- 2.20.1