Template:Infobox What Do I Want: Difference between revisions

An idea by Jeff Lawlor
Created on 2025-04-17
No edit summary
No edit summary
Line 1: Line 1:
<div class="infobox-idea">
<div class="infobox-idea">
   <figure class="infobox-image">
   <div class="infobox-image">
     [[File:What Do I Want.png|center|300px]]
     [[File:What Do I Want.png|center|300px]]
   </figure>
   </div>


   <div class="infobox-meta">
   <div class="infobox-meta">
Line 46: Line 46:
   </ul>
   </ul>
</div>
</div>
<script>
  document.addEventListener('DOMContentLoaded', function () {
    document.querySelectorAll('.infobox-tab').forEach(button => {
      button.addEventListener('click', () => {
        const tab = button.dataset.tab;
        document.querySelectorAll('.infobox-panel').forEach(panel => panel.style.display = 'none');
        document.querySelector('.infobox-panel.' + tab).style.display = 'block';
        document.querySelectorAll('.infobox-tab').forEach(b => b.classList.remove('active'));
        button.classList.add('active');
      });
    });
  });
</script>