JSFiddle - React, Tailwind, and code Playground
HTML
<div class="form-group col-xs-12 checklist patientOrOther">
<p>Will this CD be going to you (the patient) or to another facility/clinician?</p>
<label for="patient">
<input type="radio" name="toPatientOrOther" id="patient" value="patient" checked>To the Patient (myself)</label>
<label for="other">
<input type="radio" name="toPatientOrOther" id="other" value="other">To Another Facility/Clinician</label>
</div>
<div class="toPatient hide">
<p>Info needed when going to patient</p>
</div>
<div class="toOther hide">
<p>Info needed when going to another facility/clinician</p>
</div>
CSS
.hide {
display:none;
}
JavaScript
$('#patient').on('click', function () {
if ($(this).is(':checked')) {
$('.toOther').addClass('hide');
$('.toPatient').removeClass('hide');
}
});
$('#other').on('change', function () {
if ($(this).is(':checked')) {
$('.toPatient').addClass('hide');
$('.toOther').removeClass('hide');
}
});