Skip to content

Using two distinct containers for a modal #926

Answered by daun
bozdevs asked this question in Help
Discussion options

You must be logged in to vote

There's also a plugin readme section about the recommended markup for modal use cases.

<div id="swup" class="transition-main">

  <!-- The modal overlaid on the main content -->
  <main id="car" class="modal">
    <h1>Car Y</h1>
    <p>Lorem ipsum dolor...</p>
  </main>

  <!-- The list of cars overlaid by the modal above -->
  <section>
    <ul>
      <li><a href="/cars/x/">Car X</a></li>
      <li><a href="/cars/y/">Car Y</a></li>
      <li><a href="/cars/z/">Car Z</a></li>
    </ul>
  </section>

</div>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by daun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants