DHTML : Step 2: Animating the menu
Contents ]
Dr Benton

The Other Way Round

A problem that seems hard to tackle from the front should be approached from another angle. This is the way we have chosen to help you understand how the code of our dynamic menu works. Rather than explaining every bit of it to you, we will identify the parts that comprise the menu and show you how they interact to form a consistent block.

The creation of the menu can be expressed in four main lines:

  • the handling of the images shown in the menu and their loading;

  • the displaying of a layer content;

  • the definition of the relationships between the various menu components;

  • and the dynamic creation of the HTML code that enables a real-time generation of the menu!

Take it easy! To make our explanations easier to follow, we will refer to instructions through their respective line number. You could display the numbered version of the script.js file in another browser window, or even better, print it out.



1   2   3   4   5   6   7   8   9   10