Commit 13a682a2c79d9aaad8a8efede1adb61fb6a7006b

Authored by Leonardo Merlin
1 parent 30670d57

small improvments on equalHeights cals

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
js/jquery.equalHeights.js
... ... @@ -5,12 +5,12 @@ $.fn.equalHeights = function(px) {
5 5 $(this).each(function(index, item){
6 6 var $item = $(item);
7 7 $item.height('auto'); // force a 'recalc' height
8   -
9   - if ($item.height() > currentTallest) { currentTallest = $item.height(); }
  8 + var h = $item.height();
  9 + if ( h > currentTallest) { currentTallest = h; }
10 10 if (!px && Number.prototype.pxToEm) { currentTallest = currentTallest.pxToEm(); } //use ems unless px is specified
11 11 // for ie6, set height since min-height isn't supported
12 12 if (typeof(document.body.style.minHeight) === 'undefined') { $item.css({'height': currentTallest}); }
13   - $item.css({'height': currentTallest});
  13 + $item.height(currentTallest);
14 14 });
15 15 return this;
16 16 };
... ...