DHTMLX Docs & Samples Explorer

Integration with dhtmlxAccordion

Source
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxtabbar.css">
<script  src="../../codebase/dhtmlxcommon.js"></script>
<script  src="../../codebase/dhtmlxtabbar.js"></script>
<!-- attaching a dhtmlxAccordion -->
<script src="../../../dhtmlxAccordion/codebase/dhtmlxaccordion.js"></script>
<link rel="stylesheet" type="text/css" href="../../../dhtmlxAccordion/codebase/skins/dhtmlxaccordion_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcontainer.js"></script>
 
 
<div id="a_tabbar" style="width:395px; height:390px;"/>
<script>
function init() {
    tabbar = new dhtmlXTabBar("a_tabbar", "top");
    tabbar.setSkin('dhx_skyblue');
    tabbar.setImagePath("../../codebase/imgs/");
    tabbar.addTab("a1", "Tab 1-1", "100px");
    tabbar.addTab("a2", "Tab 1-2", "100px");
    tabbar.setTabActive("a1");
    var dhxAccord = tabbar.cells("a1").attachAccordion();
    var win1 = dhxAccord.addItem("a1", "a");
    var win2 = dhxAccord.addItem("a2", "b");
    var win3 = dhxAccord.addItem("a3", "c");
    dhxAccord.openItem("a1");
}
</script>