Create button revealing hidden content
hide(button_text = "Solution")
Text to appear on the button that reveals the hidden content.
A character string containing HTML code to create a button that reveals hidden content.
Writes HTML to create a content that is revealed by a
button press. Call this function inline in an RMarkdown
document. Any content appearing after this call up to an inline
call to unhide()
will only be revealed when the user
clicks the button. See the Web Exercises RMarkdown Template for
examples.
unhide
# default behavior is to generate a button that says "Solution"
hide()
#> [1] "\n<div class='webex-solution'><button>Solution</button>\n"
# or the button can display custom text
hide("Click here for a hint")
#> [1] "\n<div class='webex-solution'><button>Click here for a hint</button>\n"