Hello! I would like some help on coding, I have been wanting to create a toggle with a picture as an icon that switches content (specifically a row and set of pictures). Can someone help me out?
Hello! I would like some help on coding, I have been wanting to create a toggle with a picture as an icon that switches content (specifically a row and set of pictures). Can someone help me out?
Could you be more specific or provide an example from another wiki (if that is where you got the idea from)? Would collapsing do what you want?
Most likely it requires Javascript. The best place to start asking for JS help is on the Script Suggestion board at the Dev wiki.
An example of how what you want to get working on another site would be very helpful.
It was an idea by myself, I want to cycle content or change a specific wall of code (specifically pictures) since the "Defensive Tower" has two modes
The best option would probably be Andrew's suggestion of tabview or tabber. Using CSS, you can change the look of the tabs by setting your own images as background images.
| |||||
|
{| style="text-align:center" | width="60px"| <div class="mw-customtoggle-left"> [[File:Central icon small help.png]] </div> | width="60px"| <div class="mw-customtoggle-right"> [[File:Central icon small search.png]] </div> |- <!-- mw-customtoggle-left --> | colspan="2" | <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-left"> {| class=" mw-collapsible-content" |- | width="60px"| [[File:Central icon small language.png|link=]] | width="60px"| [[File:Central icon small create.png|link=]] |- ! colspan="2" | left open |} </div> |- <!-- mw-customtoggle-right --> | colspan="2" | <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-right"> {| class=" mw-collapsible-content" |- | width="60px"| [[File:Central icon small create.png|link=]] | width="60px"| [[File:Central icon small language.png|link=]] |- ! colspan="2" | right open |} </div> |}
If you use tabber, you can use CSS to hide all but the first and next tabs. You could probably do something similar with tabview but I haven't tried. If you are willing to throw JS in, you could probably hide the first tab as well.