Moved unload abort code so that the event is only bound if the xhr transport is used...
[jquery.git] / src / dimensions.js
index f5212e1..17b4f8f 100644 (file)
@@ -25,7 +25,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
                if ( !elem ) {
                        return size == null ? null : this;
                }
-               
+
                if ( jQuery.isFunction( size ) ) {
                        return this.each(function( i ) {
                                var self = jQuery( this );
@@ -49,7 +49,9 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
 
                // Get or set width or height on the element
                } else if ( size === undefined ) {
-                       var orig = jQuery.css( elem, type ), ret = parseFloat( orig );
+                       var orig = jQuery.css( elem, type ),
+                               ret = parseFloat( orig );
+
                        return jQuery.isNaN( ret ) ? orig : ret;
 
                // Set the width or height on the element (default to pixels if value is unitless)