DHTMLX Docs & Samples Explorer

### Attach dhtmlxLayout 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="../../../dhtmlxLayout/codebase/dhtmlxlayout.js"></script>
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxLayout/codebase/dhtmlxlayout.css">
    <link rel="stylesheet" type="text/css" href="../../../dhtmlxLayout/codebase/skins/dhtmlxlayout_dhx_skyblue.css">

    <div id="accordObj" style="position: relative; width: 320px; height: 400px;"></div>
    <script>var dhxAccord,
    layout;
    function doOnLoad() {
        dhxAccord = new dhtmlXAccordion("accordObj");
        dhxAccord.addItem("a1", "dhtmlxLayout");
        dhxAccord.addItem("a2", "b");
        dhxAccord.addItem("a3", "c");
        dhxAccord.openItem("a1");
        layout = dhxAccord.cells("a1").attachLayout("3L");
    }</script>