Template:Navbox: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<div class="navbox"> | <div id="collapsed-head" class="navbox"> | ||
<table> | <table> | ||
{{#if: {{{title |}}}|<tr class="navbox-title"><th>{{{title}}}</th></tr>}} | {{#if: {{{title |}}}|<tr class="navbox-title"><th>{{{title}}}</th></tr>}} | ||
| Line 5: | Line 5: | ||
</div> | </div> | ||
<div class="navbox"> | <div id="expanded-head" class="navbox"> | ||
<table> | <table> | ||
{{#if: {{{title |}}}|<tr class="navbox-title"><th colspan="2">{{{title}}}</th></tr>}} | {{#if: {{{title |}}}|<tr class="navbox-title"><th colspan="2">{{{title}}}</th></tr>}} | ||
| Line 33: | Line 33: | ||
</table> | </table> | ||
</div> | </div> | ||
<script> | |||
let collapsed = true; | |||
function expand() { | |||
if (collapsed) { | |||
document.getElementById("collapsed-head").style.display = "none"; | |||
document.getElementById("expanded-head").style.display = "block"; | |||
} | |||
else { | |||
document.getElementById("collapsed-head").style.display = "block"; | |||
document.getElementById("expanded-head").style.display = "none"; | |||
} | |||
} | |||
expand(); | |||
</script> | |||
Revision as of 23:30, 19 March 2024
<script> let collapsed = true; function expand() {
if (collapsed) {
document.getElementById("collapsed-head").style.display = "none";
document.getElementById("expanded-head").style.display = "block";
}
else {
document.getElementById("collapsed-head").style.display = "block";
document.getElementById("expanded-head").style.display = "none";
}
}
expand(); </script>