Bookmark to del.icio.us
Top Navigational Bar II
Author: Mike Hall
Updated: 08/30/01 Fixed IE 6 onMouseover menu bug. Only code of Step 3 affected!
Description: One of the best of it's kind, this is Mike's two-level menu bar script. Use it to intelligently organize your site's links while adding a touch of DHTML coolness at the same time. Wonderfully useful and cool a creation this is.
The script has been updated to support a variety of subtle, but interesting new features, most of them dealing with menu display. You can now specify a width for each individual menu category and sub category, invert the later so they are displayed above, instead of below, the bar (useful if your bar is at the bottom of the page), and align it left, center, or right. Finally, you can now have multiple menu bars on one page! The core code has also be streamlined for greater efficiency, plus a few bugs have been squashed.
Demo: Scroll up!
Step 1: Insert the below into the <head> section of your page:
Step 2: Add the below event handler into the <BODY> tag itself. as follows:
exfiles.zip (click or click with shift key depressed for NS users)
Unzip the above file, and locate "navcond.js". Upload this .js file to your webpage directory, or the script won't run!
To configure the menu/sub menu items and their colors, simply edit the code of Step 1 above (see documentation inside). It it extremely straightforward.
While the below is not required reading, it is definitely recommended, and is helpful in getting to know how the menu works, and to harness some of its more advanced features.
1) Main menu methods
The following are the menu's core methods, which with the above code setup, you call using (myNavBar1.the_method()):
2) Menu links targetting
where "framename" is the name of the frame you wish to target.
3) Displaying the menu across two frames?
Frames are treated as individual windows by the browser. The bar and drop down menus cannot cross over the boundaries between frames, any more than an image on a page can be made to stick outside of the browser window. Likewise, you cannot have a drop down appear in a frame other than the one containing its parent bar.