JSFiddle - React, Tailwind, and code Playground
HTML
<div id="rating-row1">
<span class="qn" id="qn1">Question 1: <br/></span>
<div id="rating-row">
<input id="excellent" type="image" src="https://unsplash.it/200/300" name="image" width="120" height="120">
<input id="good" type="image" src="https://unsplash.it/200/300" name="image" width="120" height="120">
<input id="average" type="image" src="https://unsplash.it/200/300" name="image" width="120" height="120">
<input id="poor" type="image" src="https://unsplash.it/200/300" name="image" width="120" height="120">
<input id="verypoor" type="image" src="https://unsplash.it/200/300" name="image" width="120" height="120">
</div>
</div>
<div id="rating-row2">
<span class="qn" id="qn2">Question 2: <br/></span>
<div id="game-row">
<input id="game1" type="image" src="https://unsplash.it/200/300" name="image" width="170" height="120">
<input id="game2" type="image" src="https://unsplash.it/200/300" name="image" width="250" height="120">
<input id="game3" type="image" src="https://unsplash.it/200/300" name="image" width="180" height="120">
<input id="game4" type="image" src="https://unsplash.it/200/300" name="image" width="150" height="120">
</div>
</div>
<div id="rating-row3">
<span class="qn" id="qn3">Question 3: <br/></span>
<div id="last-row">
<input id="excellent" type="image" src="https://unsplash.it/200/300" name="image" width="120" height="120">
<input id="good" type="image" src="https://unsplash.it/200/300" name="image" width="120" height="120">
<input id="average" type="image" src="https://unsplash.it/200/300" name="image" width="120" height="120">
<input id="poor" type="image" src="https://unsplash.it/200/300" name="image" width="120" height="120">
...
JavaScript
$(document).ready(function(){
$("#rating-row2 input").attr('disabled','disabled').css('opacity',0.5);
$("#rating-row3 input").attr('disabled','disabled').css('opacity',0.5);
$('#rating-row1 input').click(function(){
$("#rating-row1 input").attr('disabled','disabled').css('opacity',0.5);
$("#rating-row3 input").attr('disabled','disabled').css('opacity',0.5);
$("#rating-row2 input").removeAttr("disabled");
});
})