Bug Tracker

Opened 8 years ago

Closed 8 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 8 years ago by lrbabe

Component: unfiledeffects
Owner: set to lrbabe
Priority: undecidedlow
Status: newassigned

comment:3 Changed 8 years ago by timmywil

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

comment:4 Changed 8 years ago by lrbabe

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:5 Changed 8 years ago by lrbabe

comment:6 Changed 8 years ago by timmywil

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 8 years ago by lrbabe

Resolution: wontfix
Status: assignedclosed
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.