Opened 12 years ago
Closed 12 years ago
#9482 closed enhancement (wontfix)
.css() and .animate() should accept "" values
Reported by: | lrbabe | Owned by: | lrbabe |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | effects | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using pure DOM code, after setting the inline style of an element, it is possible to reset it by setting a style property to null. See: http://jsfiddle.net/vjMgD/
jQuery doesn't handle null values at all, with .css() and .animate().
Change History (6)
comment:1 Changed 12 years ago by
Component: | unfiled → effects |
---|---|
Owner: | set to lrbabe |
Priority: | undecided → low |
Status: | new → assigned |
comment:3 Changed 12 years ago by
comment:4 Changed 12 years ago by
With which versions of IE isn't it compatible?
I wouldn't really mind leaving .css() as is, but I would find it very useful to have such feature in .animate().
comment:6 Changed 12 years ago by
Your patch normalizes null to empty string. I don't think this is something we want to add, especially if it takes more than one line.
comment:7 Changed 12 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
Summary: | .css() and .animate() should accept null values → .css() and .animate() should accept "" values |
We won't support null.
Note: See
TracTickets for help on using
tickets.
This is the preferred way: http://jsfiddle.net/timmywil/vjMgD/2/
I'm -1 on adding support for null, which is not actually supported in IE. We'd have to normalize to empty string and I don't see any added value. Plus, seems it would just confuse people after having told everyone to use empty string since 1.0