Skip to main content

accordian below teasers

<script>
document.addEventListener("DOMContentLoaded", function () {
  // 1. Locate the header with "Former General Managers"
  const headers = document.querySelectorAll(".accordion-header");
  let gmHeader = null;

  for (const header of headers) {
    if (header.textContent.includes("Former General Managers")) {
      gmHeader = header;
      break;
    }
  }

  // 2. Get the matching accordion-content (assumed to be next sibling)
  const gmContent = gmHeader?.nextElementSibling;

  if (!gmHeader || !gmContent || !gmContent.classList.contains("accordion-content")) {
    console.warn("Could not find expected accordion header/content.");
    return;
  }

  // 3. Wrap header + content in a new accordion-wrapper
  const wrapper = document.createElement("div");
  wrapper.className = "accordion-wrapper gm-accordion-wrapper";

  // Move the actual nodes into the wrapper
  gmHeader.parentNode.insertBefore(wrapper, gmHeader);
  wrapper.appendChild(gmHeader);
  wrapper.appendChild(gmContent);

  // 4. Move wrapper below the last board member card
  const lastCard = document.querySelector(
    "#app .poc-layout-three-column .poc-instances-main-content .has-image.has-no-date.poc-instance:last-of-type"
  );

  if (lastCard && lastCard.parentNode) {
    lastCard.insertAdjacentElement("afterend", wrapper);
    console.log("✅ Accordion section successfully moved.");
  } else {
    console.warn("❌ Could not find the last board member card.");
  }
});
</script>
<style>
#app .gm-accordion-wrapper {
  width: 100vw; /* Full viewport width */
  max-width: none;
  margin: 2rem 0;
  padding-left: 5px;
  box-sizing: border-box;
  display: block;
  clear: both;
}


</style>