JSFiddle - React, Tailwind, and code Playground
HTML
<label>
Electronics
<input type="radio" id="electronics" name="rdbutton" />
</label>
<br />
<label>Computers
<input type="radio" id="computers" name="rdbutton" />
</label>
<br />
<label>Others
<input type="radio" id="others" name="rdbutton" />
</label>
<br />
<div id="showhide" style="opacity: 0">
<input type="text" id="others_text" name="others_text" class="subCheck" />
<input type="text" id="others_text_2" name="others_text_2" class="subCheck" />
<input type="text" id="others_text_3" name="others_text_3" class="subCheck" />
</div>
JavaScript
$('input:radio').on('click', function() {
if($(this).attr('id') == 'others') {
$('#showhide').css('opacity', 1.0);
} else {
$('#showhide').css('opacity', 0).find('input:text#others_text').val('');
}
});