diff --git a/src/css.js b/src/css.js index dd0ca4e2..b95eb47d 100644 --- a/src/css.js +++ b/src/css.js @@ -123,7 +123,11 @@ jQuery.each(["height", "width"], function( i, name ) { set: function( elem, value ) { // ignore negative width and height values #1599 - return Math.max( parseFloat(value), 0 ) + "px"; + value = parseFloat(value); + + if ( value >= 0 ) { + return value + "px"; + } } }; });