From 3c310e34605c12759374b9f3709c655b91625dd6 Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Wed, 26 Mar 2014 20:18:43 +0100 Subject: [PATCH] Fix some image glitches while not all images are loaded. --- public/main.js | 12 +++++++----- src/buchdesmonats/layout.html | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/public/main.js b/public/main.js index 4eb78f3..72b4b48 100644 --- a/public/main.js +++ b/public/main.js @@ -1,8 +1,10 @@ $(function() { - $('#covers').masonry({ - columnWidth: 265, - gutter: 5, - isFitWidth: true, - itemSelector: '.cover-item' + $('#covers').imagesLoaded(function() { + $('#covers').masonry({ + columnWidth: 265, + gutter: 5, + isFitWidth: true, + itemSelector: '.cover-item' + }); }); }); diff --git a/src/buchdesmonats/layout.html b/src/buchdesmonats/layout.html index 476babd..0117729 100644 --- a/src/buchdesmonats/layout.html +++ b/src/buchdesmonats/layout.html @@ -6,6 +6,7 @@ +