JSFiddle - React, Tailwind, and code Playground

by synz izynz

HTML

<table>
<tr>
  <td class="title"><span>A</span></td>
  <td><input type="radio" name="test1"></td>
  <td><input type="radio" name="test1"></td>
</tr>
<tr>
  <td class="title"><span>B</span></td>
  <td><input type="radio" name="test2"></td>
  <td><input type="radio" name="test2"></td>
</tr>
</table>

JavaScript

$("input").on('change',function(){
	var title = $(this).closest("tr").find(".title > span").text();
  $("body").append("<span>"+title+" was changed</span><br>");
});