NN 6, IE 5
You want to present a navigation menu that looks and operates like the expandable/collapsible hierarchy shown in the lefthand frame of many popular products (Windows Explorer, Outlook Express, Adobe Acrobat PDF bookmarks, and so on).
Use the expandableMenu.js library shown in Example 10-6 in the Discussion to populate an HTML
container on your page with a collapsible menu like the one shown in
Figure 10-4. A simple, empty
element is all you need in the HTML portion of the solution:
In the body, assign the menu initialization function,
initExpMenu( ), to the
Other pieces that you need to provide or customize, as described in the Discussion, are the following:
Images for the outline graphics
Script global variable values for precached images and outline item link target
Outline data assigned to the
A pre-expansion state (optional)
Style sheet rule dimensions to match your image designs and font specifications
This recipe works with Internet Explorer 5 or later and Netscape 6 or later. It does not operate as-is in Opera, but see the Discussion section for more information.
Figure 10-4. The expandable navigation menu
Participating in this recipe are a few style sheet rules that control the appearance and layout of elements that scripts create ...