Bug Tracker

Opened 12 years ago

Closed 12 years ago

#7984 closed bug (invalid)

animate and fill property

Reported by: [email protected] Owned by: [email protected]
Priority: low Milestone: 1.next
Component: effects Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:


I have a bug when i try this :

$(this).animate({"fill": "black"}, "fast");

with the firefox's console i've :

Expected color, but 'NaNpx' find. Error of analysis of the value for 'fill'.

$(this).css("fill", "black"); works fine.

I use a SVG document

Change History (3)

comment:1 Changed 12 years ago by addyosmani

Priority: undecidedlow

Thanks for submitting a ticket to the jQuery Bug Tracker! Could you please also provide us with a reduced test case which reproduces the issue you're describing on http://jsFiddle.net?. This will assist us in fully evaluating the bug you're reported.

comment:2 Changed 12 years ago by addyosmani

Owner: set to [email protected]
Status: newpending

comment:3 Changed 12 years ago by jitter

Component: unfiledeffects
Resolution: invalid
Status: pendingclosed

I don't think this is a bug for the following reasons

  1. jQuery doesn't reliably support working with SVG at the current time as far as I'm aware. Check #7584 for progress on this issue.
  1. The animate() documentation says

    All animated properties should be a single numeric value [...] properties that are non-numeric cannot be animated using basic jQuery functionality.

So currently you can't animate the fill property with jQuery core alone.

To get done what you want anyway, there are 2 options, which both include slightly adapting existing plugins so they support the fill property (adding the string fill to list of other color-related properties).

Note: See TracTickets for help on using tickets.