summaryrefslogtreecommitdiffstats
path: root/jquery.matchHeight.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery.matchHeight.js')
-rw-r--r--jquery.matchHeight.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/jquery.matchHeight.js b/jquery.matchHeight.js
index e714cf9..b976f2d 100644
--- a/jquery.matchHeight.js
+++ b/jquery.matchHeight.js
@@ -232,6 +232,7 @@
// iterate the row and find the max height
$row.each(function(){
var $that = $(this),
+ style = $that.attr('style'),
display = $that.css('display');
// temporarily force a usable display value
@@ -249,8 +250,12 @@
targetHeight = $that.outerHeight(false);
}
- // revert display block
- $that.css('display', '');
+ // revert styles
+ if (style) {
+ $that.attr('style', style);
+ } else {
+ $that.css('display', '');
+ }
});
} else {
// if target set, use the height of the target element