Search
Other Tabs & Accordions questions
Forum

Button/link to expand or close all accordion items at once

Joris Lange's Avatar Joris Lange
Is it possible to open/close all accordion items at once with a custom button/link regardless of their current state?
Thanks,
Joris
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases

Then you can do something like:
<button type="button" onclick="RegularLabs.TabsAccordions.closeAll();">Close All</button>
Please post a rating at the Joomla! Extensions Directory
Joris Lange's Avatar Joris Lange
Realised within two hours in an updated version. Hero!

But... my wish is to toggle. Or not exactly. I would like to open all accordion items with one click, or close if all are open, regardless of current state. A custom Bootstrap 4 example can be seen at www.heupafwijkingen.nl/afwijkingen/heupd...e-kinderen/inleiding (button 'Alle vragen') This seems to be very usefull.

TIA,
Joris
Peter van Westen's Avatar Peter van Westen ADMIN
A new dev version is available:
regularlabs.com/development-releases

The Tabs & Accordions work a bit differently to the Bootstrap examples.

Tabs & Accordions uses 'sets'. So each {tab ...}...{/tabs} and {accordion ...}...{/accordions} is a set of one or more tabs or accordions.
Within a set, only one item can be open. Opening one will close any other opened items in that set.

See here for more info on the new functionality:
docs4.regularlabs.com/tabsaccordions/goi...dependent-accordions

(Yes, already there, even though the new version isn't released yet...)
Please post a rating at the Joomla! Extensions Directory
Joris Lange's Avatar Joris Lange
Thanks again Peter.

But my wish is that they continue to work as a set; so with normal behavior: if you open one, the other closes.

However, I would love to be able to open or close the entire set at once, as in the example on www.heupafwijkingen.nl/afwijkingen/heupd...e-kinderen/inleiding .

Is this combination feasible?

TIA,
Joris
Peter van Westen's Avatar Peter van Westen ADMIN
No, it is not possible to have more than 1 item opened in a set.
Please post a rating at the Joomla! Extensions Directory
Joris Lange's Avatar Joris Lange
It's a pity. Also for printing/saving whole pages, all accordion content.
Thanks anyway.
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases

This should fix the issue with print pages not getting the correct styling (things being hidden).
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription