rnumpx = /^-?\d+(?:px)?$/i,
rnum = /^-?\d/,
+ cssShow = { position: "absolute", visibility: "hidden", display:"block" },
+ cssWidth = [ "Left", "Right" ],
+ cssHeight = [ "Top", "Bottom" ],
+
// cache check for defaultView.getComputedStyle
getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
// normalize float css property
styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat",
- fcamelCase = function(all, letter){
+ fcamelCase = function( all, letter ) {
return letter.toUpperCase();
};
style.zoom = 1;
// Set the alpha filter to set the opacity
- var opacity = parseInt( value, 10 ) + '' === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
- var filter = style.filter || jQuery.curCSS( elem, 'filter' ) || "";
+ var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
+ var filter = style.filter || jQuery.curCSS( elem, "filter" ) || "";
style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
}
return style.filter && style.filter.indexOf("opacity=") >= 0 ?
- (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + '':
+ (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
"";
}
css: function( elem, name, force, extra ) {
if ( name === "width" || name === "height" ) {
- var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name === "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
+ var val, props = cssShow, which = name === "width" ? cssWidth : cssHeight;
function getWH() {
val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
- if ( extra === "border" ) { return; }
+ if ( extra === "border" ) {
+ return;
+ }
jQuery.each( which, function() {
if ( !extra ) {