Bug Tracker

Modify

Ticket #7984 (closed bug: invalid)

Opened 2 years ago

Last modified 2 years ago

animate and fill property

Reported by: morgan.s134@… Owned by: morgan.s134@…
Priority: low Milestone: 1.next
Component: effects Version: 1.4.4
Keywords: Cc:
Blocking: Blocked by:

Description

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

comment:1 Changed 2 years ago by addyosmani

  • Priority changed from undecided to low

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 2 years ago by addyosmani

  • Owner set to morgan.s134@…
  • Status changed from new to pending

comment:3 Changed 2 years ago by jitter

  • Status changed from pending to closed
  • Resolution set to invalid
  • Component changed from unfiled to effects

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).

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.