Make sure that non-px values aren't manipulated before input to height/width.
[jquery.git] / src / css.js
index 84b6e60..69c4452 100644 (file)
@@ -155,7 +155,7 @@ jQuery.each(["height", "width"], function( i, name ) {
                },
 
                set: function( elem, value ) {
-                       if ( value !== "" ) {
+                       if ( rnumpx.test( value ) ) {
                                // ignore negative width and height values #1599
                                value = parseFloat(value);