In my web application, I have a tree that utilizes fancytree. Everything is functioning properly, except for the fact that I need to set the font color to red for certain nodes. I have implemented the use of extraClasses
in my JSON, which is successfully applying to the correct nodes as confirmed through the browser's debugger.
While I am able to easily apply CSS attributes such as font-style
and background-color
, for some reason the font color is not being applied to the base span.fancytree-title
. Instead, all nodes are appearing in black.
CSS:
span.OrgDataTreeNotChecked
{
background-color: #EFFAFA;
color: red !important;
font-style: italic;
}
The C# code generating the relevant extraClasses:
if (org.Status == "NotChecked")
item.extraClasses = "OrgDataTreeNotChecked";
Upon inspection in the browser debugger, the color attribute is clearly present:
Yet, when I inspect the span.fancytree-title
, the color is being overridden and displayed in black instead.
Various attempts have been made to solve the issue, such as trying to override the color for those nodes in jQuery within the .init
event of the Fancy tree and within the document ready function:
$(".OrgDataTreeNotChecked").closest(".fancytree-title").css({ "color": "red" });
Even the brute force method of setting the color for all .fancytree-title
elements was attempted:
$(".fancytree-title").css({ "color": "red" });
However, these attempts proved to be ineffective. I am at a loss for solutions. The font color simply refuses to apply, while all other attributes function correctly. Assistance is greatly appreciated!