I use temporary tiddler with some actions to toggle a class on a div element. This mimics the below JavaScript code in pure WikiText.
- JS Code
toggle.onclick = () => {
content.classList.toggle("expanded");
};
- Html snippet
<button id="toggle">
Toggle Content
</button>
<div id="content">
Hello TiddlyWiki!
</div>
Request: I am looking for a WikiText script to reproduce the above result on the fly without using temporary tiddler or field! Is this possible?