unction updateTransition() {
      let els = document.querySelectorAll('.parent > div[class]')
      for (let c = els.length, i = 0; i < c; i++) {
        els[i].classList.toggle('box1')
      }
    }

    let intervalID = window.setInterval(updateTransition, 5000)
  </script>
</body>
</html>
