Hello, I'm trying to color objects in SVG using variables as follows: within the symbolo "S1" has 5 objects "ob1" "OB2" "OB3" ...
when the page is loaded, the object inside the symbolo s1 called ob1 picks up the color of the variable color1, the OB2 takes the color2 so on ..
In Stage I did so:
color1 = "blue";
sym.getSymbol ("C-Bi") $ ("zoze") css ("color", color1)..;
As I do now so that when I click on the red button the variable color1 pass to be red and update my object ??
I'm trying so, but is not working:
var color = sym.getVariable ("color1");
color1 = "green";
Your property is wrong. You have to use "fill" instead of "color".
A demo about use tag: https://css-tricks.com/examples/svg-external-cascade/