title: Why won't my JavaScript open this modal box?
body: <p>I'm trying to call up a click element to open up a modal box, and i'm unsure what I'm doing wrong.</p>
  
  <p>I've done basic debugging, but I'm still relatively new to this, so I may just be missing something. </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-js lang-js prettyprint-override"><code>var focus = document.getElementById("teal");
  var modal = document.getElementById("bg-modal");
  
  if (focus) {
  focus.addEventListener("click", function() {
      modal.style.display = "flex";
    });
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#bg-modal {
      background-color: rgba(0, 0, 0, 0.8);
      width: 100%;
      height: 100%;
      position: absolute;
      top: 0;
      justify-content: center;
      align-items: center;
      display: none;
  }
  
  .modal-contents {
      height: 600px;
      width: 1080px;
      background-color: white;
      text-align: center;
      padding: 20px;
      position: relative;
      border-radius: 4px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class = "col-md-3" id = "teal-col"&gt;
     &lt;a id = "teal-link" href = ""&gt;
       &lt;div id = 'teal'&gt;
       &lt;/div&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div id = 'bg-modal'&gt;
    &lt;div id = "modal-contents"&gt;
      &lt;div class = "close"&gt; + &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'm not too worried about closing the modal right now, just getting the display state to change in the CSS.</p>