I want to style the rows of my fancytree (which expands using lazy-load, and has a table built in) using the classes 'level1', 'level2', and 'level3'
...
extensions: ["table"],
table: {
nodeColumnIdx: 1
},
renderColumns: function (event, data) {
var node = data.node,
$tdList = $(node.tr);
renderRow($tdList,node.getLevel());
},
function renderRow($this,level) {
$this.addClass('level'+(level%3+1));
...
}
This code works well for the child nodes, as I expand the tree deeper and deeper. The problem is that the all the parent nodes up to the top of the tree have the classes that I previously added, removed.
Any ideas why?