From 13a682a2c79d9aaad8a8efede1adb61fb6a7006b Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Fri, 19 Jun 2015 17:01:10 -0300 Subject: [PATCH] small improvments on equalHeights cals --- js/jquery.equalHeights.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/jquery.equalHeights.js b/js/jquery.equalHeights.js index 7a19515..b10c24e 100644 --- a/js/jquery.equalHeights.js +++ b/js/jquery.equalHeights.js @@ -5,12 +5,12 @@ $.fn.equalHeights = function(px) { $(this).each(function(index, item){ var $item = $(item); $item.height('auto'); // force a 'recalc' height - - if ($item.height() > currentTallest) { currentTallest = $item.height(); } + var h = $item.height(); + if ( h > currentTallest) { currentTallest = h; } if (!px && Number.prototype.pxToEm) { currentTallest = currentTallest.pxToEm(); } //use ems unless px is specified // for ie6, set height since min-height isn't supported if (typeof(document.body.style.minHeight) === 'undefined') { $item.css({'height': currentTallest}); } - $item.css({'height': currentTallest}); + $item.height(currentTallest); }); return this; }; -- libgit2 0.21.2