Template:Checkbox hide unhide
From Proteopedia
(Difference between revisions)
Line 3: | Line 3: | ||
<nowiki> | <nowiki> | ||
{{Checkbox hide unhide|Name="ATP molecule"|Selection="ATP"}}</nowiki> | {{Checkbox hide unhide|Name="ATP molecule"|Selection="ATP"}}</nowiki> | ||
- | In that spot, a checkbox will appear. | + | In that spot, a checkbox will appear. |
+ | |||
<jmol> | <jmol> | ||
<jmolCheckbox> | <jmolCheckbox> | ||
Line 25: | Line 26: | ||
</nowiki> | </nowiki> | ||
</noinclude> | </noinclude> | ||
+ | <includonly> | ||
<jmol> | <jmol> | ||
<jmolCheckbox> | <jmolCheckbox> |
Revision as of 14:52, 29 August 2018
This template is to make a checkbox that hides an object of a scene when unchecked, and displays them again when checked. The checkbox is checked by default, so it makes sense if the object is visible in the scene. To use the template, include the following in your Proteopedia text:
{{Checkbox hide unhide|Name="ATP molecule"|Selection="ATP"}}
In that spot, a checkbox will appear.
Under the hood, the following Wikimedia/Jmol script is inserted:
<jmol> <jmolCheckbox> <scriptWhenChecked>display displayed or {{{Selection}}}</scriptWhenChecked> <scriptWhenUnchecked>hide {{{Selection}}} or hidden</scriptWhenUnchecked> <checked>true</checked> <text>{{{Selection}}}</text> </jmolCheckbox> </jmol>
<includonly>