EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: yamilbracho on July 14, 2015, 03:16:32 PM



Title: Close all panels in an accordion
Post by: yamilbracho on July 14, 2015, 03:16:32 PM
As the subject, How do I close all the panels in an accordion using javascript ?

TIA,
Yamil


Title: Re: Close all panels in an accordion
Post by: stworthy on July 14, 2015, 06:26:07 PM
Get all the accordion panels and call 'collapse' method to collapse them.
Code:
var panels = $('#aa').accordion('panels');
$.map(panels, function(p){
p.panel('collapse');
})


Title: Re: Close all panels in an accordion
Post by: yamilbracho on July 15, 2015, 08:03:53 AM
It works!!!
Thanks a lot!!!!