Important: when posting, please provide your Club Number at a minimum, and as many details as possible.
For further info, please read This page before posting.

Completely collapse an accordion?

  • paulb
  • paulb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thanks: 0

Completely collapse an accordion?

9 years 10 months ago
#56385
Hi!

Is there a way to completely collapse an accordion, so that when you first went to the page all sections would be closed with only the titles visible?

It seems like the first section is always open, and only collapses when another section is clicked on.

Thanks!
The topic has been locked.
  • SteveTheTechie
  • SteveTheTechie's Avatar
  • Offline
  • Emeritus
  • Emeritus
  • Posts: 11492
  • Thanks: 3057

Re: Completely collapse an accordion?

9 years 10 months ago - 9 years 10 months ago
#56392
I think you need to tell us your club number and what you are trying to accomplish.

I define the default styling of the accordions... The styling can only be changed with advanced techniques requiring understanding of HTML, CSS and JavaScript.
Last edit: 9 years 10 months ago by SteveTheTechie.
The topic has been locked.
  • paulb
  • paulb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thanks: 0

Re: Completely collapse an accordion?

9 years 10 months ago
#56405
Hi Steve,

Our club is 875053, Cartus Magnus Toastmasters.

See the example here: cartusmagnus.toastmastersclubs.org/Useful_Links.html

The first section of the accordion ("Overcoming Fear") is always open when the page is first loaded. I would like all sections to be collapsed so that it's clear to someone visiting the page that there are multiple sections.

Thanks,
Bridget
The topic has been locked.
  • SteveTheTechie
  • SteveTheTechie's Avatar
  • Offline
  • Emeritus
  • Emeritus
  • Posts: 11492
  • Thanks: 3057

Re: Completely collapse an accordion?

9 years 10 months ago - 9 years 10 months ago
#56406
Well, this is why I tend to prefer tabs, and I have been progressively replacing accordions in system dialogs with tabs.

In any case, if you are comfortable with javascript, you can try putting the following at the top of that page's content (insert in Source View). Make sure you save a backup copy of the page first.

Code:
<script>jQuery("#UsefulLinks").accordion("option", {active: false, collapsible: true})</script>
I have not tested this... so make sure you have a backup of the page.

Last edit: 9 years 10 months ago by SteveTheTechie.
The topic has been locked.
Moderators: BrianHeniPamrhtaylor3marc33NotLiableNSBjgavinLcala305peterb323DebbieT
Time to create page: 0.146 seconds