@@ 6775-6790 (lines=16) @@ | ||
6772 | i = 0, |
|
6773 | len = which.length; |
|
6774 | ||
6775 | if ( val > 0 ) { |
|
6776 | if ( extra !== "border" ) { |
|
6777 | for ( ; i < len; i++ ) { |
|
6778 | if ( !extra ) { |
|
6779 | val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0; |
|
6780 | } |
|
6781 | if ( extra === "margin" ) { |
|
6782 | val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0; |
|
6783 | } else { |
|
6784 | val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0; |
|
6785 | } |
|
6786 | } |
|
6787 | } |
|
6788 | ||
6789 | return val + "px"; |
|
6790 | } |
|
6791 | ||
6792 | // Fall back to computed then uncomputed css if necessary |
|
6793 | val = curCSS( elem, name, name ); |
|
@@ 6801-6811 (lines=11) @@ | ||
6798 | val = parseFloat( val ) || 0; |
|
6799 | ||
6800 | // Add padding, border, margin |
|
6801 | if ( extra ) { |
|
6802 | for ( ; i < len; i++ ) { |
|
6803 | val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0; |
|
6804 | if ( extra !== "padding" ) { |
|
6805 | val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0; |
|
6806 | } |
|
6807 | if ( extra === "margin" ) { |
|
6808 | val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0; |
|
6809 | } |
|
6810 | } |
|
6811 | } |
|
6812 | ||
6813 | return val + "px"; |
|
6814 | } |