Fix #10478. Replace jQuery.isNaN with jQuery.isNumeric.

Thanks to Christian C. Salvadó for the unit tests!
This commit is contained in:
Dave Methvin
2011-10-11 21:04:22 -04:00
parent 6afc2c074b
commit 83c08ffa1f
5 changed files with 45 additions and 5 deletions

View File

@@ -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 {