JSFiddle - React, Tailwind, and code Playground
by antisanity
HTML
<input type="radio" name="test" id="r1">
<label for="r1">value1</label>
<span id="r1msg" style="display:none;">Value1 desc...</span>
<br
/>
<input type="radio" name="test" id="r2"><label for="r2">value2</label>
<span id="r2msg" style="display:none;">Value2 desc...</span>
JavaScript
$('input').on({
click: function (e) {
this.focus();
$('#' + this.id + 'msg').show();
},
blur: function (e) {
$('#' + this.id + 'msg').hide();
}
});