diff options
-rw-r--r-- | .build_number | 2 | ||||
-rw-r--r-- | themes/wind/js/ui.init.js | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/.build_number b/.build_number index fd3f0cb5..713a7c27 100644 --- a/.build_number +++ b/.build_number @@ -3,4 +3,4 @@ ; process. You don't need to edit it. In fact.. ; ; DO NOT EDIT THIS FILE BY HAND! -build_number=363 +build_number=364 diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index 5a83c015..c9f9202c 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -54,6 +54,8 @@ $(document).ready(function() { // Initialize thumbnail hover effect $(".g-item").hover( function() { + // Store original height so we can change it back afterward + $(this).attr("data-orig-height", $(this).height()); // Insert a placeholder to hold the item's position in the grid var placeHolder = $(this).clone().attr("id", "g-place-holder"); $(this).after($(placeHolder)); @@ -77,17 +79,12 @@ $(document).ready(function() { }, function() { // Reset item height and position - if ($(this).next().height()) { - var sib_height = $(this).next().height(); - } else { - var sib_height = $(this).prev().height(); - } - $(this).css("height", sib_height); + $(this).css("height", $(this).attr("data-orig-height")); $(this).css("position", "relative"); $(this).css("top", 0).css("left", 0); // Remove the placeholder and hover class from the item $(this).removeClass("g-hover-item"); - $(this).gallery_valign(); + $(this).gallery_valign(); $("#g-place-holder").remove(); } ); @@ -95,7 +92,7 @@ $(document).ready(function() { // Realign any thumbnails that change so that when we rotate a thumb it stays centered. $(".g-item").bind("gallery.change", function() { $(".g-item").each(function() { - $(this).height($(this).find("img").height() + 2); + $(this).height($(this).find("img").height() + 2); }); $(".g-item").equal_heights().gallery_valign(); }); |