0 points

Loop Over querySelectorAll Matches Javascript


dashboard

Wed May 13 2020 12:50:13 GMT+0000 (UTC)

Posted by @Hitech #javascript

buttons.forEach((button) => {
  button.addEventListener('click', () => {
    console.log("forEach worked");
  });
});
content_copy Copy

https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/