i want change the color of this div when i click on it i try to use this javascript but nothing,
const buttonChange = () => {
const button = document.querySelector('.uno');
button.addEventListener('click', () => {
button.classList.toggle('.uno-active');
})
}
.uno{
color: rgb(12, 114, 231);
background-color: rgb(255, 255, 255);
}
.uno-active{
color: rgb(255, 255, 255);
background-color: rgb(11, 28, 47);;
}
<div>
<p class="uno">COSA È</p>
</div>
////////////////////////////////