Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


vertical menu



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
Jeca



Joined: 17 Jan 2007
Posts: 1

PostPosted: Wed Jan 17, 2007 8:24 pm    Post subject: vertical menu Reply with quote

Hi everybody,

I’m trying to make a vertical menu that would expand. This is javascript function that I have so far:

menu_status = new Array();
function showHide(theid)
{
if (document.getElementById)
{
var switch_id = document.getElementById(theid);

if(menu_status[theid] != 'show')
{
switch_id.className = 'show';
menu_status[theid] = 'show';
}
else
{
switch_id.className = 'hide';
menu_status[theid] = 'hide';
}

It works fine except one thing: once I select different parent-menu a child-menu from previous parent-menu is not closed. So I could expend every parent-menu and see all child-menus in same time. What I want is to see child-menu from only selected parent-menu, and I don’t know how to do it!

Any ideas?

(i think i should have to loop through them and close each one individually each time I expand a parent, BUT I don't know how Sad )


Thanks so much for your time guys

Jeca Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap