The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Help: Visibility & Nested Divs

Hi,

I am building a custom set of menus generated using the spry framework for ajax for a client's website. The navigation occurs all in one page through a combination of ajax scripting and javascript/css to build layered, multiple level menus.

When you click the major tabs (profile/projects/features/contact), it opens up a menu in the negative space. From here, some of these menu items lead to submenus. The submenus load in the same area of the page. (in the WIP only the projects>buildings path works)

The concept of the navigation is to remain static - that is I don't want the menus to disappear onmouseout or appear on mouseover - everything is done through clicks, as if it were separate pages, but it is really one page with xml generated dynamic content.

Now, when you click a different menu I want all menu divs to be hidden except the chosen menu. However, I want to do this intelligently, without turning off every single div with a separate line of code.

So i have the top level submenu divs nested within one "top level" div, and then the deeper level submenus are nested within their own divs. Then I want to hide these levels of divs all at once by hiding the outer div when I navigate to the other level.

But for whatever reason when my script hides the outer div the inner divs stay visible.

So I guess I am looking for a way to fix this so when you hide the outer div all the inner divs hide as well (i can't use inherit because they need to act on their own as well) I want to avoid this situation of manually hiding every individual div: