- Home
- Forum
- ASP.NET MVC (Classic)
- Can you open multiple Accordion panels at once
Can you open multiple Accordion panels at once
Thanks in advance,
Gary Cryer
Thanks for contacting syncfusion forum.
We regret to let you know that accordion does not allow to open all the accordion panels at a same time by default. Any one of the panels can be opened by using the option Active(numericvalue). Could you please let us know your exact requirement so that we would analyze more on this and provide you an efficient solution.
Kindly provide the required details.
Regards,
Varalakshmi
Hi Whaylon Douglas Coleman,
Thanks for sharing the details with us.
An accordion doesn't allow more than one content panel to be
open at the same time. If you want to open more than a panel, then you must
manually customize the styles of Accordion control. Please refer the below
given code snippet,
<code>
[Script]
function expandAll() {
$("#myAccordion").find("h3").each(function
(i) {
//customize
header for each panels
$(this).removeClass("ui-state-default").addClass("ui-state-active");
});
$("#myAccordion").find("div").each(function
(i) {
//displays
panel content
$(this).css("display", "block");
});
$("#myAccordion").find("span").each(function
(i) {
//customize
the icon images for expanded panels
$(this).removeClass("ui-icon-triangle-1-n").addClass("ui-icon-triangle-1-s");
});
}
function collapseAll() {
$("#myAccordion").find("h3").each(function
(i) {
//customize
header for each panels
$(this).removeClass("ui-state-active").addClass("ui-state-default");
});
$("#myAccordion").find("div").each(function
(i) {
//hides
panel content
$(this).css("display", "none");
});
$("#myAccordion").find("span").each(function
(i) {
//customize
the icon images for collapsed panels
$(this).removeClass("ui-icon-triangle-1-s").addClass("ui-icon-triangle-1-e");
});
}
</code>
Kindly try the above specified solution and let us know if
it helps.
Regards,
Varalakshmi
- 3 Replies
- 3 Participants
-
GC Gary Cryer
- Nov 30, 2011 12:37 AM UTC
- Mar 12, 2013 05:59 AM UTC