Difference between revisions of "Collapsible Elements - Mediawiki"
m |
m (→Image toggle using template) |
||
Line 64: | Line 64: | ||
=====Image toggle using template===== | =====Image toggle using template===== | ||
+ | '''Start state is expanded''' | ||
<pre> | <pre> | ||
{{Collapsible|Your collapsible content goes here}} | {{Collapsible|Your collapsible content goes here}} | ||
Line 87: | Line 88: | ||
</pre> | </pre> | ||
{{Collapsed|My collapsed content goes here}} | {{Collapsed|My collapsed content goes here}} | ||
+ | |||
====Additional Notes:==== | ====Additional Notes:==== | ||
*Not an extension but a built into core. See http://www.mediawiki.org/wiki/ResourceLoader/Default_modules#jquery.makeCollapsible | *Not an extension but a built into core. See http://www.mediawiki.org/wiki/ResourceLoader/Default_modules#jquery.makeCollapsible |
Revision as of 12:48, 25 June 2013
Examples
<div class="mw-collapsible mw-collapsed"> This text is not collapsible; but the next is collapsible and hidden by default: <div class="mw-collapsible-content">{{Lorem}}</div> </div>
This text is not collapsible; but the next is collapsible and hidden by default:
Customize toggle text
<div class="mw-collapsible" data-expandtext="show more" data-collapsetext="hide me"> This text is not collapsible; but the next is collapsible and hidden by default: <div class="mw-collapsible-content">{{Lorem}}</div> </div>
This text is not collapsible; but the next is collapsible and hidden by default:
Toggle outside of collapsible element
<div class="mw-customtoggle-myToggle1" style="cursor:pointer; color:blue">[+/-] Click here to toggle</div> <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-myToggle1"> <div class="toccolours mw-collapsible-content">{{Lorem}}</div> </div>
Toggle using image
<div class="collapse-pre-one mw-collapsible"> <div class="mw-collapsible-toggle" style="float: none;"> <span class="down">[[File:Collapse-small-silver.png|12px|left|link=]] show less</span> <span class="up">[[File:Expand-small-silver.png|12px|left|link=]] show more</span> </div> <div class="mw-collapsible-content"> {{Lorem}} </div> </div>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Image toggle using template
Start state is expanded
{{Collapsible|Your collapsible content goes here}}
Your collapsible content goes here
{{Collapsible|More of your collapsible content goes here *it can even *have a *bulleted list }}
More of your collapsible content goes here
- it can even
- have a
- bulleted list
Start state is collapsed
{{Collapsed|My collapsed content goes here}}
My collapsed content goes here
Additional Notes:
- Not an extension but a built into core. See http://www.mediawiki.org/wiki/ResourceLoader/Default_modules#jquery.makeCollapsible
- Default toggle text reside at: Mediawiki:collapsible-expand and Mediawiki:collapsible-collapse
- More examples of collapsible text.
- The image toggle is working in conjunction with the following theme CSS:
.collapse-pre-one .mw-collapsible-toggle .up, .collapse-pre-one.mw-collapsed .mw-collapsible-toggle .down { display: none; } .collapse-pre-one .mw-collapsible-toggle .down, .collapse-pre-one.mw-collapsed .mw-collapsible-toggle .up { display: block; margin-right:.5em; }