| 804 | var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; |
| 805 | |
| 806 | function getWH() { |
| 807 | val = name == "width" ? elem.offsetWidth : elem.offsetHeight; |
| 808 | var padding = 0, border = 0; |
| 809 | jQuery.each( which, function() { |
| 810 | padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; |
| 811 | border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; |
| 812 | }); |
| 813 | val -= Math.round(padding + border); |
| 814 | } |
| 815 | |
| 816 | if ( jQuery(elem).is(":visible") ) |
| 817 | getWH(); |