| 6541 | curCSS = getComputedStyle || currentStyle; |
| 6542 | |
| 6543 | function getWH( elem, name, extra ) { |
| 6544 | var which = name === "width" ? cssWidth : cssHeight, |
| 6545 | val = name === "width" ? elem.offsetWidth : elem.offsetHeight; |
| 6546 | |
| 6547 | if ( extra === "border" ) { |
| 6548 | return val; |
| 6549 | } |
| 6550 | |
| 6551 | jQuery.each( which, function() { |
| 6552 | if ( !extra ) { |
| 6553 | val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0; |
| 6554 | } |
| 6555 | |
| 6556 | if ( extra === "margin" ) { |
| 6557 | val += parseFloat(jQuery.css( elem, "margin" + this )) || 0; |
| 6558 | |
| 6559 | } else { |
| 6560 | val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0; |
| 6561 | } |
| 6562 | }); |
| 6563 | |
| 6564 | return val; |
| 6565 | } |
| 6566 | |
| 6567 | if ( jQuery.expr && jQuery.expr.filters ) { |
| 6568 | jQuery.expr.filters.hidden = function( elem ) { |