0
I have 3 div with the class ('option') and I have a class as the name of ('Selected'). I would like to remove the class from the div that is already with ('Selected') and switch to the other with the click. I tried so, but he does not withdraw from the last that is already with the ('Selected')
<div @click="e => e.target.classList.toggle('selected')" class="col-4 option">
<div @click="e => e.target.classList.toggle('selected')" class="col-4 option">
<div @click="e => e.target.classList.toggle('selected')" class="col-4 option">
Call a function to set a boolean variable. Ai tu faz uma verificação Exp: :class="div ? 'col-4 option': 'col-4'"
– adventistaam