DHTMLX Docs & Samples Explorer

### Attach dhtmlxTree to Accordion

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">

    <div id="accordObj" style="position: relative; width: 320px; height: 400px;"></div>
    <script>var dhxAccord;
    function init() {
        dhxAccord = new dhtmlXAccordion("accordObj");
        dhxAccord.addItem("a1", "dhtmlxTree");
        dhxAccord.addItem("a2", "b");
        dhxAccord.addItem("a3", "c");
        dhxAccord.openItem("a1");
        //;
        var tree = dhxAccord.cells("a1").attachTree();
        tree.setSkin("dhx_skyblue");
        tree.setImagePath("../../../dhtmlxTree/codebase/imgs/csh_vista/");
        tree.loadXML("../../../dhtmlxWindows/samples/common/tree.xml");
    }</script>