JSFiddle - React, Tailwind, and code Playground
HTML
<div id="group-1">
<div data-role="fieldcontain">
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Choose a pet:</legend>
<input type="radio" name="1-choice" id="1-choice-A" value="A" checked="checked" />
<label for="1-choice-A">None</label>
<input type="radio" name="1-choice" id="1-choice-B" value="B" />
<label for="1-choice-B">Nada</label>
<input type="radio" name="1-choice" id="1-choice-C" value="C" />
<label for="1-choice-C">Lizard</label>
</fieldset>
</div>
<img id="1-lizard" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/Bartagame_fcm.jpg/250px-Bartagame_fcm.jpg" />
</div>
<div id="group-6">
<div data-role="fieldcontain">
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Choose a pet:</legend>
<input type="radio" name="6-choice" id="6-choice-A" value="A" checked="checked" />
<label for="6-choice-A">None</label>
<input type="radio" name="6-choice" id="6-choice-B" value="B" />
<label for="6-choice-B">Nada</label>
<input type="radio" name="6-choice" id="6-choice-C" value="C" />
<label for="6-choice-C">Lizard</label>
</fieldset>
</div>
<img id="6-lizard" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/18/Bartagame_fcm.jpg/250px-Bartagame_fcm.jpg" />
</div>
JavaScript
var entries = new Array('1', '6');
var index;
for (index = 0; index < entries.length; ++index) {
$("#"+ entries[index] +"-lizard").hide();
$("#"+ entries[index] +"-choice-A").bind("click", function() {
$("#"+ entries[index] +"-lizard").hide();
});
$("#"+ entries[index] +"-choice-B").bind("click", function() {
$("#"+ entries[index] +"-lizard").hide();
});
$("#"+ entries[index] +"-choice-C").bind("click", function() {
$("#"+ entries[index] +"-lizard").show();
});
}