mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Make sure that empty height/width values are still set.
This commit is contained in:
parent
99fcf3babb
commit
d1f3dc9a04
13
src/css.js
13
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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user