Drop Down Menus Triggered by Onclick Event
But what does it DO?:
This example illustrates a technique for making drop down menus that are far easier to implement than other more commonly encountered methods.
These work when a visitor clicks on a Drop Menu link. Clicking again will toggle the menu closed as will clicking the last option on a menu to "close menu".
Strengths:
Very Code Light, simple to implement and works across both version 4+ browsers (although far better in IE because of better CSS implementation.)
Weaknesses:
Doesn't appear to work under Netscape6 Preview (may be a browser issue). Nav4 positioning is terrible (unless you like Layers...which they apparently are abandoning in Navigator6 since a call to
document.layers returns undefined) because of this fact the X and Y returned when the triggering event is generated are used as the positioners for the menu
under Nav4. Another problem that can occur is seen when a drop menu is placed near the bottom or right of the page, if the menu is large enough it will extend off the screen with no way to reach the contents, additional checking could prevent this -OR- being careful where to locate menus on the page.
|
|