const handleClick = e => {
let isOn = e.currentTaget.classList.contains('on');
if (isOn) {
e.currentTaget.classList.remove('on');
} } else {
e.currentTaget.classList.add('on');
}
}
Hello!
I want to turn on the other elements when the on button turns off How do I insert the code?
I'd really appreciate your help!
javascript react
This is what we usually do:
event target = clicked yosok
© 2024 OneMinuteCode. All rights reserved.