CodeThatMenu Positioning Example

CodeThatMenu Positioning Example

var MenuDef = {
	"style"	 : {
		"box" : false,
		"css" : "test1",
		"align" : "center",
		"bgcolor" : "#CCCCCC",
		"size"	 : [100, 15],
		"direction" : "h",
		"itemoffset" : {
			"y" : 1, "x" : 1
		},
		"border" : {
			"color" : "black", "width" : 1
		}
	},
	"itemover" : {
		"bgcolor" : "#EEEEEE", "css" : "test1"
	},
	"position" : {
		"absolute" : true, "pos" : [50, 40]
	},
	"items" : [
	{
		"text" : "Item 1",
		"menu" : {
			"style" : {
				"direction" : "v"
			},
			"position" : {
				"anchor" : "s",
				"anchor_side" : "nw",
				"menuoffset" : {
					"x" : "0", "y" : "3"
				}
			},
			"items"	 : [
			{
				"text" : "Item 1 : 1"
			},
			{
				"text" : "Item 1 : 2"
			},
			{
				"text" : "Item 1 : 3"
			} ]
		}
	},
	{
		"text" : "Item 2",
		"menu" : {
			"position" : {
				"anchor" : "nw", "anchor_side" : "sw",
				"menuoffset" : {
					"x" : "0", "y" : "-3"
				}
			},
			"items"	 : [
			{
				"text" : "Item 2 : 1"
			},
			{
				"text" : "Item 2 : 2"
			} ]
		}
	} ]
};