EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Alfred on August 14, 2018, 12:50:03 PM



Title: Two selected panel in easyui accordion
Post by: Alfred on August 14, 2018, 12:50:03 PM
Is it possible to have two or more panels opened in easyui accordion:

Code:
<div class="easyui-accordion">
   <div selected="true"></div>
   <div selected="true"></div>
</div>



Title: Re: Two selected panel in easyui accordion
Post by: jarry on August 14, 2018, 05:19:02 PM
The 'multiple' property should be set to true. Call 'select' method to select all the panels.
Code:
var aa = $('#aa');
var panels = aa.accordion('panels');
for(var i=0; i<panels.length; i++){
aa.accordion('select', i);
}