getElement(id).settings.hidden()
(since beta 0.3)
Makes the element invisible. Note that when printed, a hidden element still occupies space on the page, but its content is not visible.
Example:
[js highlight=”5″ try=”true”]newText(“instruction”, “Guess what fruit is in the image below”)
.print()
,
newImage(“fruit”, “pear.png”)
.settings.hidden()
.print()
,
newButton(“reveal”, “Reveal fruit”)
.print()
.wait()
,
getImage(“fruit”)
.settings.visible()
[/js]
Adds some text to the page, a blank space below it and a button below the blank space which, when clicked, reveals an image of a pear.