Toggle show/hide answers in learnr

Hello

Question: is there an easy way to toggle show/hide text in learnr tutorials? 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.

Any advice gratefully received.

Found a simple solution which doesn't involve loads of javascript...

<details><summary><b>Click here for explanation</b></summary>
It looks as though there is a increasing, but curved, relationship between brain mass and body mass but the plot is very hard to interpret because almost all of the data are very close to the origin. This is because both brain mass and body mass are strongly positively skewed: here's a histogram of body mass to make the point.
</details>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.