I've just implemented my own macro derived from this, but it has an issue, which turns out is present in this sample, too. Clicking anywhere on the expandable portion of the fold collapses it down to the title.
How do I ensure that only the intended <$button> is a trigger to open/close the fold? On Wednesday, 23 September 2015 08:08:51 UTC+1, Tobias Beer wrote: > > Hi Eric, > > >> Use a <$button> widget with class="tc-btn-invisible" to create the >> heading. Surround the section content with a corresponding <$reveal> >> widget. >> > > I tried to wrap this inside a macro but it has its limitations: > > http://fold.tiddlyspot.com > > issuesi1) Only one section can be shown at a time? > testing the macro belowclick link to open result: Test > <http://fold.tiddlyspot.com/#Test>: > > <<fold "!Section One" """and here > comes the content""">><br> > <<fold "!Section Two" """has entirely > different content""">> > > a macro to fold sections$:/.tb/macros/fold > <http://fold.tiddlyspot.com/#%24%3A%2F.tb%2Fmacros%2Ffold>: > > \define fold(heading, text) > <$button class="tc-btn-invisible" popup=<<qualify > "$:/state/section$heading$">>> > > $heading$ > </$button> > <$reveal type="nomatch" state=<<qualify "$:/state/section$heading$">> text=""> > > $text$ > </$reveal> > \end > > Best wishes, > > — tb > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b78309c4-7eff-4b35-b3d8-e95aa438989e%40googlegroups.com.

