bubbles random color

PHOTO EMBED

Fri Jul 08 2022 14:40:07 GMT+0000 (Coordinated Universal Time)

Saved by @gorlanova #javascript #ui #cute

function bubbleHover() {
  for (var e = document.querySelectorAll('circle'), t = 0; t < e.length; t++) {
    e[t].addEventListener('mouseover', function () {
      fillColor(this)
    })
  }
}
function fillColor(e) {
  e.setAttribute('style', 'fill:' + colors[Math.floor(Math.random() * colors.length)])
}
content_copyCOPY