DHTMLX Docs & Samples Explorer

Index
dhtmlxaccordion

## dhtmlxAccordion Configuration

### Setting Image Path

Method setIconsPath() should be used to set the full paths to the directory where Accordion image files are located. In this method the user should set path to the directory, where accordion icons images are stored.

        <script>
            dhxAccrod.setIconsPath("[full path to icons image files directory]");
        </script>

### Setting Sizes

As it was stated above, the accordion object can be attached to a window. Initially, the accordion occupies all the window's space. In the case of window's resizing, it becomes responsible for accordion's resizing as well.

If the user intends to attach dhtmlxAccordion to some other place on page, the adjustment of Accordion object's size to the outer dimension of the container is done by means of setSizes() method:

        <script>
            dhxAccord.setSizes();
        </script>

This method doesn't take any input parameters as the size of the object is adjusted automatically with the help of it.

### Setting Effect

The effect in dhtmlxAccordion lies in noticeable smoothness of Accordion items expanding/collapsing. If it is set, this smoothness is clearly visible when the component's items are being expanded/collapsed. It can be defined by means of setEffect() method:

        <script>
            dhxAccord.setEffect(true|false);
        </script>

This method is set to false by default. This means that initially there is no any noticeable effect in the process of items expanding/collapsing. This method's parameter should be set to true if the user wants to switch this effect on.