JSFiddle - React, Tailwind, and code Playground
HTML
<label class="required">Type</label><br/>
<span class="vertical">
<input checked="checked" id="diabetes_type-none" name="diabetes_type" type="radio" value="none" /><label for="diabetes_type-none">No diabetes</label><br />
<input id="diabetes_type-dm1" name="diabetes_type" type="radio" value="dm1" /><label for="diabetes_type-dm1">DM1</label><br />
<input id="diabetes_type-dm2" name="diabetes_type" type="radio" value="dm2" /><label for="diabetes_type-dm2">DM2</label><br />
<input id="diabetes_type-other" name="diabetes_type" type="radio" value="other" /><label for="diabetes_type-other">Other type</label>
<input class="small free" id="diabetes_type-other_more" name="diabetes_type-other_more" type="text" />
</span>
JavaScript
var _var = "diabetes_type-other"
$(document).ready(function() {
_radioName = "diabetes_type"; // Obtain programmatically
var lastChecked = false;
$("input[name=" + _radioName + "]").change(function() {
alert('changed'+this.value);
});
});