Is there any way within JS (using Angular / jQuery) to override/change, or create/remove a CSS class?
I'm using a library that has predefined classes for particular features of the UI. I want the user to be able to specify some features that are defined in CSS (such as color). The library is using SVG, so I'm not sure if I can use the standard selector methods to add another class (I've not tried, but this might be possible).
I could also modify the library to add a method to override the color, but this is not my preferred route if I can easily change CSS classes once loaded.
As an example -:
I might have a class that's defined in my CSS -:
.buttonclass {
color: black;
}
then in the library, this class is used (it's actually used within an SVG tag). I want to be able to change the color:
property to something that's defined within javascript as it's user configurable.
The specific example is the class is used to define the color of a graph in an SVG graphing library. There's no method in the library to change the color of the line, but I want the user to set this.