| 339 | curCSS = getComputedStyle || currentStyle; |
| 340 | |
| 341 | function getWH( elem, name, extra ) { |
| 342 | var which = name === "width" ? cssWidth : cssHeight, |
| 343 | val = name === "width" ? elem.offsetWidth : elem.offsetHeight; |
| 344 | |
| 345 | if ( extra === "border" ) { |
| 346 | return val; |
| 347 | } |
| 348 | |
| 349 | jQuery.each( which, function() { |
| 350 | if ( !extra ) { |
| 351 | val -= parseFloat(jQuery.css( elem, "padding" + this )) || 0; |
| 352 | } |
| 353 | |
| 354 | if ( extra === "margin" ) { |
| 355 | val += parseFloat(jQuery.css( elem, "margin" + this )) || 0; |
| 356 | |
| 357 | } else { |
| 358 | val -= parseFloat(jQuery.css( elem, "border" + this + "Width" )) || 0; |
| 359 | } |
| 360 | }); |
| 361 | |
| 362 | return val; |
| 363 | } |
| 364 | |
| 365 | if ( jQuery.expr && jQuery.expr.filters ) { |
| 366 | jQuery.expr.filters.hidden = function( elem ) { |