0

Question: is there an easy way to toggle show/hide text in learnr tutorials? I know that you can use code folding in rmarkdown to show/hide code but what I'd like to do is have a "show answer" which then shows a paragraph explaining something. Quite often I find with teaching statistics that I want a student to have a look at something and think about it, and then see if what they think agrees with what I think. A toggle show/hide text (or just show hidden text) would be really handy.

Not really great with css and totally at sea with javascript so if possible an explanation for a 3-year old would be appreciated :-)

Any advice gratefully received.

user3359624
  • 304
  • 2
  • 13

1 Answers1

0

D'oh! Putting this here in case anyone else is looking for it

<details><summary>Click here for explanation</summary

Some text

</details>

That does exactly what I needed.

user3359624
  • 304
  • 2
  • 13