User:Tiddlywinks/MakeHideTarget
class="clicktoggle-target" data-group="Spoilers" data-target="DLC"
This template makes an element that is hidden when a button that has the same value is pressed (see User:Tiddlywinks/MakeHideButton).
It is possible to make these elements start hidden (so that they first appear when the corresponding button is pressed) by simply adding display: hidden; to the element's style attribute.
Parameters
- Unnamed
- 1: a "group" name
- 2: a name designating a specific thing in the current group (generally whatever is in the element this is attached to)
Examples
- Main article: User:Tiddlywinks/MakeHideButton/doc#Examples
Different elements can share the same name, but they will all be affected the same way—if you click a button to hide "blue" elements, all "blue" elements will be hidden, if they have the same group and name (it doesn't matter if the button came before or after or what).
The choice of group can be trickier/more sophisticated... If you're not sure, it's probably best to give things that you don't want interacting with each other separate groups. Refer to User:Tiddlywinks/MakeHideButton/doc#Examples for more details.
- No categories associated with this article