Hey Guys,
Is there a way to define the selected accordian item style in the css file or by code, in order to highlight the current item that is open (ie. set a different bg color)
Rgds,
Ritchie.
Hello,
there is no public solution to do that. Try to set onActive handler with the following code:
dhxAccord.attachEvent(“onActive”, function(){
this.forEachItem(function(item){
if (item.className!=“dhx_acc_item_hidden”) {
item.className = “dhx_acc_item”+(item._isActive?" active":"");}
});
});
also you should define a class with the necessary background:
div.dhx_acc_base_dhx_skyblue div.dhx_acc_item.active div.dhx_acc_item_label { }
to call onActive event initially you can use dhxAccord.callEvent(“onActive”,[itemId]) method.
Thanks Alex, that solution is great.