title: Trying to open Modal window with click on classname instead of id
body: <p>Hellow Everyone,</p>
  
  <p>I believe I'm missing something very simple, but I can't seem to find it. 
  I'm trying to open a modal window when the user clicks on a div. When the div has the <strong>"id"</strong> of <strong>myBtn1</strong>, it works. But when the div has the <strong>"class"</strong> of <strong>myBtn1</strong>, it doesn't work. </p>
  
  <p>Any help is greatly appreciated.</p>
  
  <p><strong>This works</strong></p>
  
  <pre><code>// Get the button that opens the modal
  var btn = document.getElementById("myBtn1");
  
  &lt;a href="http://www.cnn.com/" target="_blank"&gt;
  &lt;div id="myBtn1"&gt;Open Cnn&lt;/div&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p><strong>This doesn't work.</strong></p>
  
  <pre><code>// Get the button that opens the modal
  var btn = document.getElementsByClassName("myBtn1");
  
  &lt;a href="http://www.cnn.com/" target="_blank"&gt;
  &lt;div class="myBtn1"&gt;Open Cnn&lt;/div&gt;
  &lt;/a&gt;
  </code></pre>