I am trying to customize a color of an SVG depending on certain variables. To make it easy to understand, I want to be able to fade the color of an SVG on hover using jQuery. I have created a custom SVG and am linking it in
I've embedded the SVG via <object>
but am unsure of where I am able to change the color of the SVG. I am using <object>
because It is apparently more compatible with more browsers. (If there is a better way, please let me know).
<object class="nav_ico" id="nav_ico-collective" type="image/svg+xml" data="global/images/nav_ico-collective.svg"></object>
Is there any way to
- Change the color of the SVG
- Animate that color to another one?
I am already using jquery-color.js and I assume I will have to use another plugin just to talk to the SVG.
Any ideas?