diff options
author | John Resig <jeresig@gmail.com> | 2010-11-09 11:09:07 -0500 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2010-11-09 11:09:07 -0500 |
commit | fb48ae8e6cca25fd29ef2b1eb23e9efa7b0eef7c (patch) | |
tree | 150abf047642cb0f1e8af19f1c3d0237fe07f9ff /src/dimensions.js | |
parent | b5b3c73db3e4e615e504cd0af08ff6842b104542 (diff) | |
download | jquery-fb48ae8e6cca25fd29ef2b1eb23e9efa7b0eef7c.tar.gz jquery-fb48ae8e6cca25fd29ef2b1eb23e9efa7b0eef7c.zip |
Make sure that when multiple variables are being declared that assignments are each done on their own line.
Diffstat (limited to 'src/dimensions.js')
-rw-r--r-- | src/dimensions.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dimensions.js b/src/dimensions.js index f5212e1b6..f35b0acfb 100644 --- a/src/dimensions.js +++ b/src/dimensions.js @@ -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) |