summaryrefslogtreecommitdiffstats
path: root/jquery.matchHeight.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery.matchHeight.js')
-rw-r--r--jquery.matchHeight.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/jquery.matchHeight.js b/jquery.matchHeight.js
index 030e159..367df93 100644
--- a/jquery.matchHeight.js
+++ b/jquery.matchHeight.js
@@ -78,6 +78,10 @@
var $row = $(row),
maxHeight = 0;
+ // ensure elements are visible to prevent 0 height
+ var hiddenParents = $row.parents().add($row).filter(':hidden');
+ hiddenParents.css({ 'display': 'block' });
+
// iterate the row and find the max height
$row.each(function(){
var $that = $(this);
@@ -93,6 +97,9 @@
$that.css({ 'display': '' });
});
+ // revert display block
+ hiddenParents.css({ 'display': '' });
+
// iterate the row and apply the height to all elements
$row.each(function(){
var $that = $(this),