I am creating a registration form, in it I will insert a voting system, I wanted to do that when clicking on some star, the previous ones will change color as well. (Here is the code I created)
<div class="vote">
<label>
<input type="radio" id="cm_star" name="fb" value="1" />
<i class="fa"></i>
</label>
<label>
<input type="radio" id="cm_star" name="fb" value="2" />
<i class="fa"></i>
</label>
<label>
<input type="radio" id="cm_star" name="fb" value="3" />
<i class="fa"></i>
</label>
<label>
<input type="radio" id="cm_star" name="fb" value="4" />
<i class="fa"></i>
</label>
<label>
<input type="radio" id="cm_star" name="fb" value="5" />
<i class="fa"></i>
</label>
The result in image: