DHTMLX Docs & Samples Explorer

### Setting Open Effect

Source

    <script src="../../codebase/dhtmlxcommon.js"></script>
    <script src="../../codebase/dhtmlxaccordion.js"></script>
    <link rel="stylesheet" type="text/css" href="../../codebase/skins/dhtmlxaccordion_dhx_skyblue.css">
    <script src="../../codebase/dhtmlxcontainer.js"></script>
    <script src="../../../dhtmlxTree/codebase/dhtmlxtree.js"></script>
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxTree/codebase/dhtmlxtree.css">
    <script src="../../../dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
    <script src="../../../dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxGrid/codebase/dhtmlxgrid.css">
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxGrid/codebase/skins/dhtmlxgrid_dhx_skyblue.css">

    <table>
    <tr>
        <td style="padding-right:10px;"><div id="accordObj" style="position: relative; width: 320px; height: 400px;"></div></td>
        <td><div id="accordObj2" style="position: relative; width: 320px; height: 400px;"></div></td>
    </td>
    </table>
    <br>
    <div astyle="margin: 50px 0px 20px 0px;">
    <input type="button" value="Enable Effect" onclick="dhxAccord.setEffect(true);">
    <input type="button" value="Disable Effect" onclick="dhxAccord.setEffect(false);">
    </div>
    <script>var dhxAccord,
    dhxAccord2,
    tree,
    grid;
    function doOnLoad() {
        dhxAccord = new dhtmlXAccordion("accordObj");
        dhxAccord.addItem("a1", "a");
        dhxAccord.addItem("a2", "b");
        dhxAccord.addItem("a3", "c");
        dhxAccord.openItem("a1");
        dhxAccord.setEffect(true);
        //;
        dhxAccord2 = new dhtmlXAccordion("accordObj2");
        dhxAccord2.enableMultiMode(true);
        dhxAccord2.addItem("a1", "a");
        dhxAccord2.addItem("a2", "b");
        dhxAccord2.addItem("a3", "c");
        dhxAccord2.forEachItem(function(item) {
            item.setHeight(item.getId() == "a1" ? 200: 100);
        });
        dhxAccord2.setEffect(true);
        //;
        tree = dhxAccord.cells("a1").attachTree();
        tree.setSkin("dhx_skyblue");
        tree.setImagePath("../../../dhtmlxTree/codebase/imgs/csh_vista/");
        tree.loadXML("../../../dhtmlxWindows/samples/common/tree.xml");
        //;
        grid = dhxAccord2.cells("a1").attachGrid();
        grid.setSkin("dhx_skyblue");
        grid.setImagePath("../../../dhtmlxGrid/codebase/imgs/");
        grid.loadXML("../../../dhtmlxWindows/samples/common/grid.xml");
    }</script>