Any existing javascript library to change svg fill color? animated preferable [closed]
开发者_JS百科
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this questiongoogled but cant be found ...
http://keith-wood.name/svg.html#anim
Raphael http://dev.opera.com/articles/view/raphael-a-javascript-api-for-svg/
add the jquery.color plugin, then add to your code:
jQuery.Color.hook( "fill stroke" );
then the animate function is what you would expect
$('g').animate({
'fill': '#07F',
}, {
duration: 1150,
queue: false,
complete: function() {}
})
精彩评论