Side navigation
#9482 closed enhancement (wontfix)
Opened June 01, 2011 01:21PM UTC
Closed June 07, 2011 03:38PM UTC
.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().
Attachments (0)
Change History (6)
Changed June 01, 2011 01:22PM UTC by comment:1
component: | unfiled → effects |
---|---|
owner: | → lrbabe |
priority: | undecided → low |
status: | new → assigned |
Changed June 02, 2011 01:37PM UTC by comment:2
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
Changed June 06, 2011 02:06PM UTC by comment:3
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().
Changed June 07, 2011 01:01PM UTC by comment:4
patch and tests here: https://github.com/jquery/jquery/pull/408
Changed June 07, 2011 03:09PM UTC by comment:5
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.
Changed June 07, 2011 03:38PM UTC by comment:6
resolution: | → wontfix |
---|---|
status: | assigned → closed |
summary: | .css() and .animate() should accept null values → .css() and .animate() should accept "" values |
We won't support null.