title: How do I show a modal when the page loads
body: <p>I am trying to show a pop up modal on a html page <strong>without</strong> bootstrap. My code does not have any js, only CSS and HTML. To show it I am using CSS, but there is no display property. I have already tried jquery like this</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.popupmodal {
    display: block;
    line-height: 250%;
    font-size: 2.5vh;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    opacity: 0;
    -webkit-transition: opacity 400ms ease-in;
    -moz-transition: opacity 400ms ease-in;
    transition: opacity 400ms ease-in;
    pointer-events: none;
  }
  
  .popupmodal:target {
    opacity: 1;
    pointer-events: auto;
  }
  
  .popupmodal&gt;div {
    height: auto;
    width: 50%;
    position: relative;
    margin: 10% auto;
    padding: 3% 2% 3% 2%;
    background: #fff;
    border-radius: 1%;
  }
  
  .popup-modal-quest&gt;div {
    background-color: transparent;
    margin: 1% auto;
    height: 60vh;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
    $(document).ready(function() {
      $("#quest-modal").show();
    });
  &lt;/script&gt;
  
  &lt;a href="#quest-modal" class="abrir-modal"&gt;You have a new quest. Click here to see.&lt;/a&gt;
  
  
  &lt;div id="quest-modal" class="popupmodal popup-modal-quest"&gt;
    &lt;div class="modal-quest"&gt;
      &lt;img src="img/wooden-warning.png"&gt;
      &lt;div class="btns-quest"&gt;
        &lt;a href="#open-modal"&gt;&lt;input type="button" value="Accept quest" class="btn-quest"&gt;&lt;/a&gt;
        &lt;a href="#go-back-page"&gt;&lt;input type="button" value="Do not accept quest" class="btn-quest"&gt;&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I am new on jquery and js, so I am learning the best ways to solve these kinda problems. I would like to know if there is a good way to make it work.</p>