While Eric solution is elegant one, using the
new features in Tiddlywiki 5.1.23 the Eric solution can be simplified as below
<$list filter="[tag<currentTiddler>!sort[title]]">
<$vars stateTid={{{ [[$:/state/slider/]addsuffix<currentTiddler>] }}}>
<h2>
<$button class="tc-btn-invisible" > <$text text={{!!title}} />
<$action-listops $tiddler=<<stateTid>> $field="text" $subfilter="+[toggle[show],[hide]]" />
</$button>
</h2>
<$reveal state=<<stateTid>> type="match" text="show">
<$transclude field="text" mode="block"/>
</$reveal>
This new solution uses the semantic operator toggle, which lets you to switch between two opposite states (show, hide). More information can be fined
The below example further shows the use of toggle operator to create a simple slider
\define tslider(tiddler)
<$vars stateTid="$:/state/toggle-slider/$tiddler$">
<$button class="tc-btn-invisible"> <$text text={{{ [<stateTid>get[text]match[show]then[hide]else[show]] }}}/>
<$action-listops $tiddler=<<stateTid>> $field="text" $subfilter="+[toggle[show],[hide]]" />
</$button>
<$reveal state=<<stateTid>> type="match" text="show">
<$transclude tiddler=<<__tiddler__>> field="text" mode="block"/>
</$reveal>
</$vars>
\end
Copy the above code and put in an empty tiddler with the below line
<<tslider HelloThere>>
and see how it nicely works!
Thank you Saq, and Jeremy for such great features!
Best wishes
Mohammad