cssHeight = [ "Top", "Bottom" ],
curCSS,
- getComputedStyle,
- currentStyle,
-
fcamelCase = function( all, letter ) {
return letter.toUpperCase();
};
if ( val <= 0 ) {
val = curCSS( elem, name, name );
- if ( val === "0px" && currentStyle ) {
- val = currentStyle( elem, name, name );
- }
-
if ( val != null ) {
// Should return "auto" instead of 0, use 0 for
// temporary backwards-compat
}
if ( document.defaultView && document.defaultView.getComputedStyle ) {
- getComputedStyle = function( elem, newName, name ) {
+ curCSS = function( elem, newName, name ) {
var ret, defaultView, computedStyle;
name = name.replace( rupper, "-$1" ).toLowerCase();
return ret;
};
-}
-
-if ( document.documentElement.currentStyle ) {
- currentStyle = function( elem, name ) {
+} else if ( document.documentElement.currentStyle ) {
+ curCSS = function( elem, name ) {
var left, rsLeft,
ret = elem.currentStyle && elem.currentStyle[ name ],
style = elem.style;
};
}
-curCSS = getComputedStyle || currentStyle;
-
function getWH( elem, name, extra ) {
var which = name === "width" ? cssWidth : cssHeight,
val = name === "width" ? elem.offsetWidth : elem.offsetHeight;