Template:Checkbox hide unhide: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 31: | Line 31: | ||
<scriptWhenChecked>display displayed or {{{Selection|all}}}</scriptWhenChecked> | <scriptWhenChecked>display displayed or {{{Selection|all}}}</scriptWhenChecked> | ||
<scriptWhenUnchecked>hide {{{Selection|all}}} or hidden</scriptWhenUnchecked> | <scriptWhenUnchecked>hide {{{Selection|all}}} or hidden</scriptWhenUnchecked> | ||
<checked> | <checked>true</checked> | ||
<text> {{{Name}}} </text> | <text> {{{Name}}} </text> | ||
</jmolCheckbox> | </jmolCheckbox> |
Revision as of 18:21, 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>
Troubleshooting:
First parameter: {{{1}}}
Second parameter: {{{2}}}}
Third parameter: {{{3}}}
Named parameter Name: {{{Name}}}
Named parameter Selection: {{{Selection}}}