CodeThatTree - Additional style parameters Example

CodeThatTree - Additional style parameters Example

 

function myfunct() {
	window.alert('myfunct');
}

var TreeDef = {
	"style" :
	{
		"imgdir" : "img/homedis.gif", // Image for directories
		"imgdiropen" : "img/home.gif", // Image for directories in open state
		"itemoffset" : {
			"x" : "20", "y" : "5"
		}, // Offset for a next tree level
		"css" : "test1tree",
		"size" : [200, 20],
		"fixwidth" : 200,
		"bgcolorcurr":"red",
		"colorcurr":"yellow"
	},
	styleover : {
		"bgcolor" : "lightblue",
		"bgcolorcurr" : "red",
		"color" : "black"
	},	
	"position" : {
		"absolute" : false, "pos" : [10, 10]
	},
	// Main items array. In this case has one item Item1
	"items" : [
	{
		"text" : "Apartments for rent", 	// Subtree definition
		"style" : {
					"imgitem" : "img/newuser.gif",
					"bgcolor": "white",
					"bgcoloropen":"black",
					"coloropen":"yellow"					
				},
		"menu" :
		{
			"style" : {
				"bgcolorcurr":"red",
				"colorcurr":"yellow"
			},
			// Subitems array.
			"items" : [ 	{
				"text" : "New residens",
				"style" : {
					"imgitem" : "img/newuser.gif",
					"bgcolor": "pink",
					"color":"red"
				}
			},
			{
				"text" : "Moved residents",
				"style" : {
					"imgitem" : "img/deluser.gif",
					"bgcolor": "lightblue",
					"color" : "white"
				}
			},
			{
				"text" : "Change an apartment",
				"style" : {
					"imgitem" : "img/edituser.gif",
					"bgcolor": "lightgreen",
					"color" : "yellow"
				}
			},
			{
				"text" : "Families",
				"style" : {
					"imgitem" : "img/family.gif",
					"bgcolor": "yellow",
					"color" : "blue"
				}
			} ]
		}
	 } ,
	{
	"text" : "Families",
	"style" : {
		"imgitem" : "img/family.gif"
	 }
	 }
	]
};