JSFiddle - React, Tailwind, and code Playground
by gubhaju
HTML
<div id="something">
<input type="radio" name="hello">
<input type="radio" name="hello">
<input type="radio" name="hello">
<input type="radio" name="hello">
<input type="radio" name="hello">
</div>
<input type="button" value="show Index">
JavaScript
$(':button').click(function(){
alert($('#something input:radio[name="hello"]:checked').index())
})