JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test">
    
    <div class="table-item">
    	<div><label for="check1"><input type='radio' name='rad' value='1'>1</label></div>
    </div>
    <div class="table-item">
    	<div><label for="check2"><input type='radio' name='rad' value='2'>2</label></div>
    </div>
    <div class="table-item">
    	<div><label for="check3"><input type='radio' name='rad' value='3'>3</label></div>
    </div>

</div>

CSS

#test {}
#test .table-item { border: solid 1px #666; height:25px; background-color:#CCC}
#test .table-selected { border:1 px solid #F00; background-color:#00F}

JavaScript

$(".table-item input").change(function() {
  $(".table-item").removeClass('table-selected');
  var div = $(this).closest('.table-item');
  if ($(this).is(":checked")) {
    div.addClass("table-selected");
  }
});