aboutsummaryrefslogtreecommitdiffstats
path: root/src/dimensions.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2011-10-11 21:04:22 -0400
committerDave Methvin <dave.methvin@gmail.com>2011-10-11 21:04:22 -0400
commit83c08ffa1ffa778e41d728ed7fa49044dd7135f9 (patch)
tree47c0d05e46556664e9e07277a727f395f6888bca /src/dimensions.js
parent6afc2c074bec5c19063c8f8ebca6bfb53c7d4cef (diff)
downloadjquery-83c08ffa1ffa778e41d728ed7fa49044dd7135f9.tar.gz
jquery-83c08ffa1ffa778e41d728ed7fa49044dd7135f9.zip
Fix #10478. Replace jQuery.isNaN with jQuery.isNumeric.
Thanks to Christian C. Salvadó for the unit tests!
Diffstat (limited to 'src/dimensions.js')
-rw-r--r--src/dimensions.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dimensions.js b/src/dimensions.js
index 7df0d5ddf..d339817c9 100644
--- a/src/dimensions.js
+++ b/src/dimensions.js
@@ -61,7 +61,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
var orig = jQuery.css( elem, type ),
ret = parseFloat( orig );
- return jQuery.isNaN( ret ) ? orig : ret;
+ return jQuery.isNumeric( ret ) ? ret : orig;
// Set the width or height on the element (default to pixels if value is unitless)
} else {