CodeThatTree - Css, Color, Background Color and Background Image Example
var TreeDef = {
"style" :
{
"imgdir" : "img/homedis.gif", // Image for directories
"imgdiropen" : "img/home.gif", // Image for directories in open state
"itemoffset" : {
"x" : "5", "y" : "0"
}, // Offset for a next tree level
"css" : "test1tree",
"fixwidth" : 200,
"fixheight" : 300,
"color" : "#00008B",
"size" : [200, 20],
"bgimg" : "img/fon.gif"
},
"styleover" : {
"bgcolor" : "#D3E5FA", "css" : "test1tree"
},
"position" : {
"absolute" : false, "pos" : [10, 10]
},
// Main items array. In this case has one item Item1
"items" : [
{
"text" : "Apartments for rent ", // Subtree definition
"style" : {
"bgcolor" : "#E1C772",
"color" : "black"
},
"menu" :
{
"style" : {
"color" : "#00008B"
},
"styleover" : {
"bgcolor" : "#D3E5FA", "css" : "test1tree"
},
// Subitems array.
"items" : [ {
"text" : "New residens",
"style" : {
"imgitem" : "img/newuser.gif"
}
},
{
"text" : "Moved residents",
"style" : {
"imgitem" : "img/deluser.gif"
}
},
{
"text" : "Change an apartment",
"style" : {
"imgitem" : "img/edituser.gif"
}
},
{
"text" : "Families",
"style" : {
"imgitem" : "img/family.gif"
}
} ]
}
} ]
};