DHTMLX Docs & Samples Explorer

Index
dhtmlxaccordion
API Methods

# List of Initialization Properties

## Common Initialization Options

- parent - string or object, the id of the container, where tree will be initialized, mandatory;
- skin - {string} defines the skin of accordion;
- icon_path - {string} defines an url where are located necessary for user embedded icons. (setIconsPath())

## Accordion's Cells

Accordion's cells can be defined through items collection

    accord = new dhtmlXAccordion({
    		parent:"accord_container",
    		items:[
                            {id:"save", text:"First item", open:true},
                            {id:"delete", text:"Second item" }
                   ]
    });

Each cell can have the next attributes:

- id - {string} the id of a cell;
- text - {string} the caption of a cell;
- img - {sting} the icon of a cell;
- open - {boolean} the current state of a cell.

## Events

Any event can be assigned by using property with the event name

    accord = new dhtmlXAccordion({
    		parent:"accord_container",
    		onActive:function(){
    			alert("I'm active");
    		}
    });