mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fix #10478. Replace jQuery.isNaN with jQuery.isNumeric.
Thanks to Christian C. Salvadó for the unit tests!
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user