Kappa Computer Solutions, LLC

Leveraging UNIX, GNU/Linux, open source, and
custom software solutions for business and beyond

Phone: 877•367•8837   Twitter: kappacs

Home arrow Articles arrow MenuPosition: Smart CSS/Javascript Hybrid Menus
MenuPosition: Smart CSS/Javascript Hybrid Menus PDF Print E-mail
Article Index
MenuPosition: Smart CSS/Javascript Hybrid Menus
Page 2
Page 3
Page 4

Menu Structure and Javascript Linkage

Menus are structured using HTML nested unordered lists and lists items.

Sub-menus of vertical menus can be set to appear either to the right (for left-side menus) or to the left (for right-side menus), and will automatically reverse direction each time either side would be hit.

First-level sub-menus of horizontal menus are vertical menus and can be set to appear either below or above the horizontal menu, with second and subsequent sub-menus appearing either to the right or left, as above.

In order to avoid page-size-dependent setup overhead at page load time, javascript support uses a just-in-time approach based on mouse-over events at the top level <UL> of each menu (or an enclosing <DIV>).

The script file, menuposition.js, depends on another script from Kappa Computer Solutions, LLC, called viewport.js (based on code from quirksmode.org), and either prototype.js from prototypejs.org or mootools.js from mootools.net.


 
< Prev