Answers for "depressed class"

0

depressed class

keys.addEventListener('click', e => {
  if (e.target.matches('button')) {
    const key = e.target
    // ...
    
    // Remove .is-depressed class from all keys
    Array.from(key.parentNode.children)
      .forEach(k => k.classList.remove('is-depressed'))
  }
})
Posted by: Guest on July-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language