Is there a way to get the accordion to autosize to the size of the contents inside each section. So when I switch sections I want it to resize so that there doesn’t have to be a scroll bar inside the accordion.
There is no such a built-in feature.
Possibly the following approach will be suitable for you:
You can try to set onActive event handler and change the height of the outher container accoding to the selected item id:
var dhxAccord = new dhtmlXAccordion(“accordObj”);
dhxAccord.attachEvent(“onActive”, function(itemId){
if(itemId==“a1”){
document.getElementById(“accordObj”).style.height = “600px”;
}
else document.getElementById(“accordObj”).style.height = “400px”;
dhxAccord.setSizes();
});