Answers for "how to remove class in all siblings javascript"

0

how to remove class in all siblings javascript

const setActive = el => {
    [...el.parentElement.children].forEach(sib => sib.classList.remove('active'))
    el.classList.add('active')
    }
Posted by: Guest on August-30-2020

Code answers related to "how to remove class in all siblings javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language