Template:Navbox Example.

From Funkinchan
Revision as of 02:04, 3 October 2023 by Jedevari (talk | contribs) (Created page with "<div class="navbox"> <div class="navbox-header"> <!-- Add a header/title for your navbox --> Header Text <span class="collapse-button">[<a href="javascript:void(0);" class="collapse-link" onclick="toggleNavbox(this)">hide</a>]</span> </div> <div class="navbox-content"> <!-- Add your content here --> Content goes here. </div> </div> <script> function toggleNavbox(element) { var content = element.parentEl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

<script>

   function toggleNavbox(element) {
       var content = element.parentElement.parentElement.nextElementSibling;
       if (content.style.display === "none" || content.style.display === "") {
           content.style.display = "block";
           element.textContent = "hide";
       } else {
           content.style.display = "none";
           element.textContent = "show";
       }
   }

</script>