ch.Menu
Description
Menu lets you organize the links by categories.
How-to
Parameters
-
el
- HTMLElement : A HTMLElement to create an instance of ch.Menu. -
options
- Object : Options to customize an instance.-
fx
- String : Enable or disable UI effects. You should use: "slideDown", "fadeIn" or "none". Default: "slideDown".
-
Extends
Properties
.Component#name
String
The name of a component.
.container
HTMLElement
The menu container.
.folds
Array
A collection of folds.
.Menu#name
String
The name of the component.
.uid
Number
A unique id to identify the instance of a component.
Methods
-
child
- Number : A given number of fold. -
child
- Number : A given number of fold.
.constructor()
Returns a reference to the constructor function.
.destroy()
Destroys an instance of Component and remove its data from asociated element.
.disable() → {component}
Disables an instance of Component.
.enable() → {component}
Enables an instance of Component.
.require() → {component}
Adds functionality or abilities from other classes.
.constructor()
Returns a reference to the constructor function.
.destroy()
Destroys a Menu instance.
.hide(child) → {menu}
Hides a specific fold.
.show(child) → {menu}
Shows a specific fold.
Events
'destroy'
Emits when a component is destroyed.
'disable'
Emits when a component is disable.
'enable'
Emits when a component is enabled.
'hide'
Event emitted when the menu hides a fold.
'ready'
Event emitted when the component is ready to use.
'show'
Event emitted when the menu shows a fold.