JSFiddle - React, Tailwind, and code Playground
HTML
<input type="radio" name="abc" id="1" value="1">1 <br>
<input type="radio" name="abc" id="1" value="2">2 <br>
<input type="radio" name="abc" id="1" value="3">3 <br>
<input type="radio" name="abc" id="1" value="4">4 <br>
JavaScript
$(document).ready(function(e) {
$(':radio').bind('change',function(){
var th = $(this), id = th.attr('id');
//alert(th);
if(th.is(':checked')){
$(':radio[id="' + id + '"]').not($(this)).attr('disabled',true);
}
else
{
$(':radio[id="' + id + '"]').not($(this)).attr('disabled',false);
}
});
});