1 Reply Latest reply on Dec 31, 2012 3:19 AM by joel_pau

    querySelectorAll?? working in edge?

    Comfunex

      Hi, I want to scan all divs (objects) with the same class (box)

      when any of them are clicked a function in called?

       

      function check() {

          var items = document.querySelectorAll(".box");

          for (i = 0; i < items.length; i++) {

              items[i].onclick = showinfo;

          }

      }

      function showinfo(e) {

          temp2 = e.target;

          console.log(temp2);

      }

       

      this syntax works in the browser but not in edge;