JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<input type="checkbox" name="SchoolAdmin" value="True" id="schooladmin">I would like to register as a school admin<br>
<input type="checkbox" name="SchoolAdmin" value="True" id="schooladmin1">I would like to register as a school admin<br>
</div>
<div>
<select id="school">
<option>a</option>
<option>b</option>
<option>c</option>
</select>
</div>
CSS
#school{
display:none;
}
JavaScript
$('#schooladmin').change(function () {
if (this.checked) {
//show the hidden div
$('#school').show("fast");
} else {
//otherwise, hide it and reset value
$('#school').hide("fast");
$('#school').val('');
}
});
$('#schooladmin1').change(function () {
if (this.checked) {
//show the hidden div
$('#school').show("fast");
} else {
//otherwise, hide it and reset value
$('#school').hide("fast");
$('#school').val('');
}
});