JSFiddle - React, Tailwind, and code Playground

HTML

<label for="q1a1">1: </label><input type="radio" name="q1" id="q1a1"/>
<label for="q1a2">2: </label><input type="radio" name="q1" id="q1a2"/>

JavaScript

$(document).ready(
    $(':radio').change(function(){
        $('body').append('<p>' + this.id + '</p>')
    })
)