Permalink
Browse files

Make sure that empty height/width values are still set.

  • Loading branch information...
jeresig committed Sep 17, 2010
1 parent 99fcf3b commit d1f3dc9a04225b327b6fd6deb9d3913918054a9f
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/css.js
@@ -150,11 +150,16 @@ jQuery.each(["height", "width"], function( i, name ) {
},

set: function( elem, value ) {
// ignore negative width and height values #1599
value = parseFloat(value);
if ( value !== "" ) {
// ignore negative width and height values #1599
value = parseFloat(value);

if ( value >= 0 ) {
return value + "px";
if ( value >= 0 ) {
return value + "px";
}

} else {
return value;
}
}
};

0 comments on commit d1f3dc9

Please sign in to comment.