JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<label>1</label>
<input type="radio" name="type" value="1" id="type_1" class="type" />
</div>
<div>
<label>2</label>
<input type="radio" name="type" value="2" id="type_2" class="type" />
</div>
<div>
<label>3</label>
<input type="radio" name="type" value="3" id="type_3" class="type" />
</div>
<div class="step4" style="display: none;">
<div class="test" id="radio_1" style="display: none;">
<label>A</label>
<input type="radio" name="A" class="ra1" id="rad1" value="A" />
<label>B</label>
<input type="radio" name="A" class="ra2" id="rad2" value="B" />
</div>
<div class="test" id="radio_2" style="display: none;">
<label>C</label>
<input type="radio" name="B" class="ra3" id="rad3" value="C" />
<label>D</label>
<input type="radio" name="B" class="ra4" id="rad4" value="D" />
</div>
<div class="test" id="radio_3" style="display: none;">
<label>E</label>
<input type="radio" name="C" class="ra5" id="rad5" value="E" />
<label>F</label>
<input type="radio" name="C" class="ra6" id="rad6" value="F" />
</div>
</div>
TypeScript
$('.type').on('click', function () {
var radio = $(this).attr('id').split("_");
var radioId = radio[1];
$('#radio_' + radioId).show();
$('.test').not('#radio_' + radioId).hide();
$('.step4').show();
});