The Ashes
Technology, Science and other news
June 27, 2009
ProtoFish: advanced hover menu
Filed under : General
ProtoFish is an advanced hover menu based on Prototype, written by Peter Slagter. You can easily add a delay to your menu (on mouseout) and choose your own hover class. All ProtoFish menu’s will respond to users who use the TAB-key to navigate through your page.
It is trivial to use. Once you load up the script (requires Prototype 1.6+) you can:
JAVASCRIPT:
-
-
document.observe(‘dom:loaded’, function() {
-
new ProtoFish(‘my-menu’, ‘400’, ‘hover’, false);
-
});
-
where the four parameters are:
- Menu id (In the example: my-menu)
- Delay before closing the menu (In the example: 400 ms)
- The classname to add when hovering over menuitems (In the example: hover)
- Whether or not the menu should remove .active classnames when your visitor hovers over the menu (In the example: false)
Tags :
No Comments