JSFiddle - React, Tailwind, and code Playground
HTML
<input type ='button' class="butt" value="go" /><br/>
<input type ='button' class="butt" value="go" /><br/>
<input type ='button' class="butt" value="go" /><br/>
<input type ='button' class="butt" value="go" /><br/>
<input type ='button' class="butt" value="go" /><br/>
<input type ='button' class="butt" value="go" /><br/>
CSS
.background {
background-color: red;}
JavaScript
$(".butt").on('click', function(){
$('.butt').not(this).removeClass('background');
$(this).toggleClass('background');
})