Is there a way to add a button or something that could collapse/uncollapse all the admonitions in a page? #7685
-
As the title says. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @jonaprieto, You can reference the other discussions, which also were related to JS:
The logic should be simple, keep track of the state of the button to decide whether to collapse or uncollapse, after press go over all
If you need more guidance, please follow the https://dontasktoask.com/ idea and be specific about where you're having issues. |
Beta Was this translation helpful? Give feedback.
Hello @jonaprieto,
yes, it's possible to do so using extra JavaScript:
You can reference the other discussions, which also were related to JS:
The logic should be simple, keep track of the state of the button to decide whether to collapse or uncollapse, after press go over all
details
tags on the page and change the state from the button, since you're enforcing the state from the button you don't need to check the state of the separatedetails
.