Check documentation for the latest version of dhtmlxSuite attachAccordion DHTMLX Docs

attachAccordion

attaches dhtmlxAccordion to a window

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

Example

var myAcc = myWins.window(id).attachAccordion();
myAcc.addItem("a1", "First item", true);
myAcc.addItem("a2", "Second item");
 
// or
var myAcc = myWins.window(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