Vorlage:HideShow: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Sysop (Diskussion • Beiträge) Keine Bearbeitungszusammenfassung |
Sysop (Diskussion • Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 18: | Zeile 18: | ||
{{HideShow|Titel|Inhalt:Probier mal [[:Template:HideShow]] aus!}} | {{HideShow|Titel|Inhalt:Probier mal [[:Template:HideShow]] aus!}} | ||
[[Category:Template]] | [[Category:Template]] | ||
</noinclude> | </noinclude>includeonly>{{#tag:div|{{#tag:div|Hide/Show {{{1|}}}|onclick=toggleHideShow('{{{1|}}}') | ||
|style=cursor: pointer; padding: 5px 10px; background: #f0f0f0; border: 1px solid #ccc; border-radius: 3px; display: inline-block; user-select: none;}} }} | |||
{{#tag:div|{{{2|}}}|id={{{1|}}}|style=display: none;}} </includeonly> | {{#tag:div|{{{2|}}}|id={{{1|}}}|style=display: none;}} </includeonly> |
Version vom 21. August 2025, 04:35 Uhr
see
function toggleHideShow(id) {
var x = document.getElementById(id);
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
Usage
{{HideShow|Titel|Inhalt: Probier mal [[:Template:HideShow]] aus!}}
includeonly>
Hide/Show Titel
includeonly>
Hide/Show
</includeonly>