Reputation: 11121
how can get different row color for different 'level' of rows in jsTree
let's say that in my sample http://jsfiddle.net/radek/sTmrv/2/
and finally the 3rd level will have the same color.
so far I managed to change color of all rows ....
Upvotes: 1
Views: 3996
Reputation: 2810
Would this work for you? See http://jsfiddle.net/sTmrv/4/
You may have to play with it a bit (untested in IE).
li.jstree-open > ul {
background: red;
display: block;
}
li.jstree-open > ul li.jstree-open > ul {
background: #CCC;
position: relative;
left: -18px;
padding-left: 18px;
width: 100%;
}
Upvotes: 3
Reputation: 7722
You could do a loop with a generated row id, and base the colors on the multiple of the row Id.. let me try typing up something quickly.
Upvotes: 1