Is it possible to collapse all cells?
dhtmlxAccordion does not have such functionality.
Would it be possible for me to go into the source and try to enable this behavior? If so, could you please point me to where I should look?
Sorry for inconvenience, there was an error in previous anser, you can do this using closeItem() method.
When I tried this, using the following code:
var dhxAccord = new dhtmlXAccordion(“accordObj”,“dhx_blue”);
dhxAccord.addItem(“a1”, “Mark’s Dev”);
dhxAccord.addItem(“a2”, “Old UAT”);
dhxAccord.cells(“a2”).attachURL("google.com); // this is open by default since it is the last one
The last cell doesn’t really collapse, it just fills the background with the default skin color.
What I’m trying to do is have all cells collapse, and when clicking on an already open cell, having that cell collapse.
Could you direct me on how I could modify the source to achieve this?
Cell is collapsed, but global container (“accordObj” in your case) stays after collapsing all cells and it have this background color.
Try to change its height after collapsing last cell, and restore height to previous before expanding any one.