diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-09-10 23:13:47 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-09-10 23:13:47 -0700 |
commit | 304dd9cb51b3514f2e663674d22f0d73c0f3e583 (patch) | |
tree | 604970fc2ad8c5b089b88fd2fc4ed89232e4ffee /themes/wind/js | |
parent | 6640bd18ca8f22482e6d383f763bf5a2a004663d (diff) |
After replacing thumbnails, resize all .g-item boxes down to just a
bit larger than the image and then do equal_heights() on them. This
tightens the grid back up again when appropriate after a rotation.
Diffstat (limited to 'themes/wind/js')
-rw-r--r-- | themes/wind/js/ui.init.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index e5071dc1..2c67bf3a 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -97,7 +97,9 @@ $(document).ready(function() { // Realign any thumbnails that change so that when we rotate a thumb it stays centered. $(".g-item").bind("gallery.change", function() { - $(this).height($(this).find("img").height() + 2); + $(".g-item").each(function() { + $(this).height($(this).find("img").height() + 2); + }); $(".g-item").equal_heights().gallery_valign(); }); } |