DHTML : Step 2: Animating the menu
Dr Benton
Parent and Child Layers
In the first workshop, we defined the structure of our menu. We created the
parent layer, i.e. the main menu that opens when the Summary button is clicked, together with the child layers, i.e. the sub-menus
that pop up.
We now need a hierarchical presentation of the menu, i.e. to establish the relationships that exist between the sub-menus
(child layer) and the main menu items (parent layer). For each main item we have to define the corresponding sub-menu that
will display and hide, and the position of the child layers in relation to the parent layer.
Examine the figure shown below:
Figure 1: The child layers form a hierarchical structure with the parent layer.
Our menu encompasses seven sub-menus or child menus (one per folder). If we include the
Summary button and the main, or "parent", menu, we obtain a total of nine menus. We now have to define the necessary relationships.