From 6cd8679dec24cd643fa3c2d9bdbf6ac8b938600c Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sun, 27 Sep 2009 22:49:46 -0600 Subject: Set .gItem height dynamically based on the tallest item in the grid. Addresses ticket #757 --- lib/gallery.common.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/gallery.common.js') diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 618c556e..a91f021e 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -6,6 +6,18 @@ }); }; + // Make the height of all items the same as the tallest item within the set + $.fn.equal_heights = function() { + var tallest_height = 0; + $(this).each(function(){ + if ($(this).height() > tallest_height) { + tallest_height = $(this).height(); + } + }); + return $(this).height(tallest_height); + }; + + // Vertically align a block element's content $.fn.gallery_valign = function(container) { return this.each(function(i){ -- cgit v1.2.3