View Full Version : Tree Nodes - Top level nodes have accordion style, different from sub-level nodes

11 Sep 2010, 1:16 PM
I have a tree I'd like to style such that top level nodes look something like an accordion, but of course, multiple top nodes may be opened at the same time, like a tree.

Sub nodes would look like typical nodes, maybe with custom icons but completely unlike top level nodes.

Anything special about top level nodes that would automatically allow this to happen or do I need to detect top level nodes when I read in the json in the tree-loader and give those nodes a completely different background css class?

Not sure where to start. Dont' want to use an accordian and multiple trees; seems like that will just totally get out of hand.

Any clues appreciated, or examples of styled custom tree nodes, thx

12 Sep 2010, 8:30 AM
Give your top level nodes a specific cls and write css rules to give the nodes with this class a accordion type look.