diff options
author | John Resig <jeresig@gmail.com> | 2010-09-17 13:51:12 -0400 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2010-09-17 13:51:12 -0400 |
commit | d1f3dc9a04225b327b6fd6deb9d3913918054a9f (patch) | |
tree | a166d31a903953d00854eae2062a2e3a8971f50c /src | |
parent | 99fcf3babbba8b794fe8b0b2e20d517156cfd4d2 (diff) | |
download | jquery-d1f3dc9a04225b327b6fd6deb9d3913918054a9f.tar.gz jquery-d1f3dc9a04225b327b6fd6deb9d3913918054a9f.zip |
Make sure that empty height/width values are still set.
Diffstat (limited to 'src')
-rw-r--r-- | src/css.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/css.js b/src/css.js index 87f9abd70..9113be2ae 100644 --- a/src/css.js +++ b/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; } } }; |