OpenWetWare:Toggle: Difference between revisions
From OpenWetWare
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
{{hide|hello world}} | {{hide|hello world}} | ||
===Multiple=== | |||
* {{toggle|item1||item1 item}} | |||
* {{toggle|item2||item2 item}} | |||
* <span class="_toggler-item1">toggle item1</span> | |||
* <span class="_toggler-item2">toggle item2</span> | |||
* <span class="_toggler-item">toggle both items</span> | |||
===Show hide all=== | |||
{{show hide all}} | |||
===Remote action=== | ===Remote action=== | ||
Line 24: | Line 35: | ||
* [[Template:Hide]] | * [[Template:Hide]] | ||
* [[Template:Toggle]] | * [[Template:Toggle]] | ||
* [[Template: | * [[Template:Toggler]] | ||
==Technical Details== | ==Technical Details== | ||
See [[MediaWiki:Common.js]] for the javascript code. | See [[MediaWiki:Common.js]] for the javascript code. |
Revision as of 17:06, 18 March 2007
This feature allows for toggling the visibility of any part of the page.
Fun Examples
Simple hiding
{{hide|hello world}} gives:
hello world
Multiple
- item1
- item2
- toggle item1
- toggle item2
- toggle both items
Show hide all
[show all] [hide all]
Remote action
Nesting
[open level 1 ]
Templates
Templates can make this much easier to use. Existing templates are:
Technical Details
See MediaWiki:Common.js for the javascript code.