Skip to main content

Bug Tracker

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:
Component: effects Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

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.


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 lrbabe comment:1

component: unfiledeffects
owner: → lrbabe
priority: undecidedlow
status: newassigned

Changed June 02, 2011 01:37PM UTC by timmywil comment:2

This is the preferred way:

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 lrbabe 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 lrbabe comment:4

Changed June 07, 2011 03:09PM UTC by timmywil 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 lrbabe comment:6

resolution: → wontfix
status: assignedclosed
summary: .css() and .animate() should accept null values.css() and .animate() should accept "" values

We won't support null.