DHTMLX Docs & Samples Explorer

Index
dhtmlxaccordion
API Methods

# dhtmlxAccordion API Methods

#### dhtmlXAccordion Object

### Init

- dhtmlXAccordionObject - constructor
- unload - destructor

### Common

- setIconsPath - sets the path to icons
- setSizes - changes object instance's size according to the outer container
- setEffect - sets an effect

### Events

- attachEvent - attaches an event handler to the accordion
- detachEvent - removes an event handler
- checkEvent - returns true if the event exists

## Items

### Common

- addItem - adds a new item
- removeItem - removes an existing item
- cells - returns the handler to an item by the id
- getId - returns an item's id
- forEachItem - iterator, calls a user-defined function n-times
- moveOnTop - move an item on the top

### Multi-Mode

- enableMultiMode - enables multimode in accordion (disabled by the default)
- setHeight - sets item's height for multimode

### Docking/Undocking

- dock - docks an item from the window
- undock - undocks an item to the window

### Text

- setText - sets item's text
- getText - returns item's text

### Visibility

- show - shows an item
- hide - hides an item

### Open/Close

- open - opens an item
- close - closes an item
- isOpened - returns true if item is opened

### Icons

- setIcon - sets an item's icon (header icon)
- clearIcon - clears an item's icon

## Attaching Objects/dhtmlx Components

- attachMenu - attaches dhtmlxMenu to a cell
- attachStatusBar - attaches status bar to a cell
- attachToolbar - attaches dhtmlxToolbar to a cell

- attachAccordion - attaches dhtmlxAccordion to a cell
- attachChart - attaches dhtmlxChart to a cell
- attachEditor - attaches dhtmlxEditor to a cell
- attachFolders - attaches dhtmlxFolders to a cell
- attachForm - attaches dhtmlxForm to a cell
- attachGrid - attaches dhtmlxGrid to a cell
- attachLayout - attaches dhtmlxLayout to a cell
- attachMap - attaches Google Maps to a cell
- attachTabbar - attaches dhtmlxTabbar to a cell
- attachTree - attaches dhtmlxTree to a cell

- attachURL - attaches dhtmlxURL to a cell
- attachObject - attaches html object to a cell