JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding sub menu items to sub menu items

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu
Author Message
Guest
Guest





PostPosted: Tue Jul 01, 2003 11:44 pm    Post subject: Adding sub menu items to sub menu items Reply with quote

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






PostPosted: Thu Jul 03, 2003 12:52 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu All times are GMT
Page 1 of 1