I have a tree in my web app that utilises fancytree. It all works very well except that for some nodes I need to set the font color to red. I'm using extraClasses
in my JSON which is all applying perfectly against the appropriate nodes and can be verified using the browser's debugger.
However, while I can easily apply font-style
and background-color
CSS attributes, for some reason the font color is not being carried down to the base span.fancytree-title
. Instead all nodes are black.
CSS:
span.OrgDataTreeNotChecked
{
background-color: #EFFAFA;
color: red!important;
font-style: italic;
}
C# generating the relevant extraClasses:
if (org.Status == "NotChecked")
item.extraClasses = "OrgDataTreeNotChecked";
In the browser debugger I can see this clearly:
You can see here that the color has made its way into the attributes for the element:
However, when I highlight the span.fancytree-title
I can see that the color is being overridden and using black instead.
I've tried various things like trying to override the color for those nodes in jQuery in both the .init
event of the Fancy tree and in the document ready function:
$(".OrgDataTreeNotChecked").closest(".fancytree-title").css({ "color": "red" });
I even tried the brute force approach of setting the color for all .fancytree-title
elements:
$(".fancytree-title").css({ "color": "red" });
This also had no effect. I'm fresh out of ideas. It just doesn't want to apply the font color and only the font color. Every other attribute works just fine. Help!