text: var modal = document.getElementById('myModal');
  var images= document.getElementsByClassName("popup");
  var modalImg = document.getElementById("img01");
  var captionText = document.getElementById("caption");
  var i;
  for (i = 0; i < images.length; i++) {
      images[i].onclick = function(){
          modal.style.display = "block";
          modalImg.src = this.src;
          modalImg.alt = this.alt;
          captionText.innerHTML = this.alt;
          }
      }
  var span = document.getElementsByClassName("close")[0];
  span.onclick = function() {
      modal.style.display = "none";
  }
  