JSFiddle - React, Tailwind, and code Playground
HTML
<input type='radio' class='radio-button' name='re'>
<input type='radio' class='radio-button' name='re'>
<input type='radio' class='radio-button' name='re'>
JavaScript
var radio_button=false;
$('.radio-button').on("click", function(event){
var this_input=$(this);
if(this_input.attr('checked1')=='11')
{
this_input.attr('checked1','11')
}
else
{
this_input.attr('checked1','22')
}
$('.radio-button').prop('checked', false);
if(this_input.attr('checked1')=='11')
{
this_input.prop('checked', false);
this_input.attr('checked1','22')
}
else{
this_input.prop('checked', true);
this_input.attr('checked1','11')
}
});