Skip to content
Permalink
Browse files

Fixed bug with jQuery: height computation for hidden elements

  • Loading branch information
Klaus Hartl
Klaus Hartl committed Sep 1, 2006
1 parent 905a0ae commit 744c0609d4848d89c528f1eb61c596ee4bc0d393
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/jquery/jquery.js
@@ -1168,12 +1168,19 @@ jQuery.extend({
oWidth = e.offsetWidth;
} else {
e = jQuery(e.cloneNode(true)).css({
visibility: "hidden", position: "absolute", display: "block"
visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0"
}).appendTo(e.parentNode)[0];

var parPos = jQuery.css(e.parentNode,"position");
if ( parPos == "" || parPos == "static" )
e.parentNode.style.position = "relative";

oHeight = e.clientHeight;
oWidth = e.clientWidth;

if ( parPos == "" || parPos == "static" )
e.parentNode.style.position = "static";

e.parentNode.removeChild(e);
}
});

0 comments on commit 744c060

Please sign in to comment.
You can’t perform that action at this time.