Check documentation for the latest version of dhtmlxSuite attachAccordion DHTMLX Docs


attaches dhtmlxAccordion to a cell

dhtmlXAccordion attachAccordion( [object conf] );
confobjectoptional, accordion config for object-api init
dhtmlXAccordiondhtmlXAccordion instance


var myAcc = dhxComponent.cells(id).attachAccordion();
myAcc.addItem("a1", "First item", true);
myAcc.addItem("a2", "Second item");
// or
var myAcc = dhxComponent.cells(id).attachAccordion({
    icons_path: "icons/",
    items: [
        { id: "a1", text: "Main Page", icon: "flag_red.png" },
        { id: "a2", text: "Navigation", icon: "flag_green.png" },
        { id: "a3", text: "Feedback", icon: "flag_blue.png" }

Back to top