How to animate a fill with jQuery

jquery, svg

Solution

Specifying the transition as part of the CSS may be simpler than adding another js lib:

$('#circle').css({fill: "red", transition: "2.0s"});

Problem

I was using ``` element.css('fill','#000000'); ``` and it works, but now I want to animate a fill so I wrote this: ``` $(element).animate({'fill': '#000000'}, 'slow'); ``` but this doesn't work, why? I would add, I am working on SVG file.

Original source