Closed Pumpapa closed 1 year ago
That's probably because you have uniquely named section. Make them the same name and they'll collapse (except for the last clicked one), like an accordion.
If you need unique section that works more or less like a <detail>
html element, then the syntax is:
!> Property chaining
#### Using properties with the client
Some example
!@
This is because the implementation doesn't rely on JS (only on pure HTML/CSS code). The unnamed section is made with a checkbox that can be checked or unchecked. If checked, the section is visible.
The named section are made with a radio box (where only one option can be active at a time, can not be unchecked). If you've created named section with all a different name, you'll get as many different radio box as you have section. You can't uncheck a radio box, without JS.
Each section should be independently collapsible; they are not grouped. I have to be able to uncollapse it, read it and then collapse it again. I added the group name only because otherwise the plugin doesn't work, as discussed in the other issue
Well I don't know why it doesn't work for you, it works on my site for unnamed collapsible (the extract above is extracted from my website).
This regexp seems off: /^!>(\[(\w[\w-]*)\]?)\s*(.*)$/
Shouldn't the ?
go after the entire (parenthesized) group and not just the \]
I tried /^!>(\[(\w[\w-]*)\])?\s*(.*)$/
and that seems to work
Ok, I've tested the regexp and it also works on my website (doesn't break, at least!). So if it works for you, let's use it.
OK. Thanks. Then I can simply update when that arrives.
I had the other issue, about the plugin not working at all, so now I have multiple uniquely named collapsibles.
When a page is loaded, all are collapsed, and uncollapsing works fine, but then clicking the arrow to collapse again doesn't work; it just scrolls to the end of the collapsible.