Jump to content

Template:Tabber: Difference between revisions

From Kanzenshuu Dragon Ball Wiki
Hujio (talk | contribs)
No edit summary
Hujio (talk | contribs)
No edit summary
 
Line 7: Line 7:


  <nowiki>{{tabber |
  <nowiki>{{tabber |
 
{{tab | Tab 1 |
{{tab | Son Goku |
Tab 1 content.
This tab contains all sorts of information about Goku.
}}
}}
 
{{tab | active = true | Tab 2 | panel style = border: 2px solid #000; |
{{tab | active = true | Vegeta | panel style = border: solid 0.2em black; |
Tab 2 content.
This tab will educate the user with a slew of info on Vegeta
}}
}}
 
{{tab | Tab 3 | title style = color: #C00; |
{{tab | Piccolo | title style = color: magenta; |
Tab 3 content.
This tab is all about Piccolo.
}}
}}
}}}</nowiki>


}}</nowiki>


{{tabber |
{{tabber |
 
{{tab | Tab 1 |
{{tab | Son Goku |
Tab 1 content.
This tab contains all sorts of information about Goku.
}}
}}
 
{{tab | active = true | Tab 2 | panel style = border: 2px solid #000; |
{{tab | active = true | Vegeta | panel style = border: solid 0.2em black; |
Tab 2 content.
This tab will educate the user with a slew of info on Vegeta
}}
}}
 
{{tab | Tab 3 | title style = color: #C00; |
{{tab | Piccolo | title style = color: magenta; |
Tab 3 content.
This tab is all about Piccolo.
}}
}}
}}
}}


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Latest revision as of 15:19, 23 November 2013

{{tabber}} presents a JavaScript tab interface so that readers can click tabs to switch between viewing different panels. Used in conjunction with the {{tab}} template.

Example

By default, the first tab will be active when the tabber is generated, but this can be overridden by placing an active argument in any tab. (The value of the argument does not matter as long as it is not empty, but true is an intuitive value to use.)

In addition, the {{tab}} template accepts panel style and title style arguments that can be used to customize the appearance of the tab panel and its title tab. Arguments must be formatted as CSS. Passing a panel style argument will completely overwrite the default style (which consists of rounded borders and padding) while passing a title style argument will supplement the styling defined in MediaWiki:Common.css.

{{tabber |
{{tab | Tab 1 |
Tab 1 content.
}}
{{tab | active = true | Tab 2 | panel style = border: 2px solid #000; |
Tab 2 content.
}}
{{tab | Tab 3 | title style = color: #C00; |
Tab 3 content.
}}
}}}


Tab 1

Tab 1 content.

Tab 2

Tab 2 content.

Tab 3

Tab 3 content.