X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcss.js;h=933d2b45e7402e638b15b2e20585001d3cf82004;hb=0174518a49e86e3f479eaf916a68b64a1e662a4f;hp=caf4985d2f5811f970bb4b19c41d01589b4e9a7b;hpb=2ae872c594790c4b935a1d7eabdf8b8212fd3c3f;p=jquery.git diff --git a/src/css.js b/src/css.js index caf4985..933d2b4 100644 --- a/src/css.js +++ b/src/css.js @@ -230,6 +230,9 @@ if ( getComputedStyle ) { if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) { ret = computedStyle.getPropertyValue( name ); + if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { + ret = jQuery.style( elem, name ); + } } return ret; @@ -289,14 +292,9 @@ function getWH( elem, name, extra ) { if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.hidden = function( elem ) { - var width = elem.offsetWidth, height = elem.offsetHeight, - skip = elem.nodeName.toLowerCase() === "tr"; - - return width === 0 && height === 0 && !skip ? - true : - width > 0 && height > 0 && !skip ? - false : - (elem.style.display || jQuery.css( elem, "display" )) === "none"; + var width = elem.offsetWidth, height = elem.offsetHeight; + + return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none"); }; jQuery.expr.filters.visible = function( elem ) {