menu.js

Pop-up menu control.


Objects

Methods

Constants


Menu(type, delay, animation, speed)

Creates new Menu object. Type is a TYPE_ constant specifying activation of Menu's first level. Delay is specified in msec and represents time interval after which the menu opens / collapses when user activates it. Animation is an ANIM_ constant specifying wich animation should Menu use, with speed of speed.

Menu::setCloseFilter(className)

Sets "close filter" to className. Every clicked element with this className will cause the Menu to collapse. Defaults to *.

Menu::setNoCloseFilter(className)

Sets "no close filter" to className. Every clicked element with this className will not cause the Menu to collapse.

Menu::addLevel(clicker, opener, deep)

Adds one level to menu. The level, consisting of element opener, will be shown when clicker is clicked. Argument deep is a boolean value, specifying whether this level is deep (opened by hovering) or shallow (opened by Menu's type).

Menu::createFromUl(ul)

Creates a menu from an already build unordered list, referenced by ul.