JSFiddle - React, Tailwind, and code Playground
HTML
<div>
</div>
<lable>
<input type="radio" name="from" id="something1" class="getvalue"> one
</lable>
<lable>
<input type="radio" name="from" id="something2" class="getvalue"> two
</lable>
<lable>
<input type="radio" name="from" id="something3" class="getvalue"> hte
</lable>
</div>
CSS
.checked11 {
background: red;
}
JavaScript
$('input:radio').click(function () {
$('input:radio').parent().removeClass('checked11');
$(this).parent(this).addClass('checked11');
});