JavaScript.CoolDev.Com Support Forums
Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com
| Author |
Message |
Guest Guest
|
Posted: Tue Jul 01, 2003 11:44 pm Post subject: Adding sub menu items to sub menu items |
|
|
This is probably a stupid question...
How do you add a sub menu to a submenu?
I tried this...
[code]
[
{"pos":[10,10], "itemoff":[0,69], "leveloff":[21,0], "style":STYLE, "size":[22,135]},
{code:"Main]",
sub:[
{"itemoff":[21,0]},
{code:"Set 0", "format":{"size":[22,160]}
sub:[
{code:'please work'},
},
{code:"Set 1", "format":{"size":[22,160]}},
{code:"Set 2", "format":{"size":[22,160]}},
{code:"Set 3", "format":{"size":[22,160]}}
]
}
];
[/code]
what am I doing wrong? |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Jul 03, 2003 12:52 am Post subject: |
|
|
Here is the code that I made work...it differs from yours by a comma and a close square bracket, I think...I find the code easier to read when indented.
| Code: |
var MENU_ITEMS =
[
{"pos":[10,10], "itemoff":[0,69], "leveloff":[21,0], "style":STYLE, "size":[22,135]},
{code:"Main",
sub:[
{"itemoff":[21,0]},
{code:"Set 0", "format":{"size":[22,160]},
sub:[
{"leveloff":[0,69]},
{code: "please work"}
]
},
{code:"Set 1", "format":{"size":[22,160]}},
{code:"Set 2", "format":{"size":[22,160]}},
{code:"Set 3", "format":{"size":[22,160]}}
]
}
];
|
|
|
| Back to top |
|
 |
|
|