git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99fcf3b
)
Make sure that empty height/width values are still set.
author
John Resig
<jeresig@gmail.com>
Fri, 17 Sep 2010 17:51:12 +0000
(13:51 -0400)
committer
John Resig
<jeresig@gmail.com>
Fri, 17 Sep 2010 17:51:12 +0000
(13:51 -0400)
src/css.js
patch
|
blob
|
history
diff --git
a/src/css.js
b/src/css.js
index
87f9abd
..
9113be2
100644
(file)
--- 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;
}
}
};