JSFiddle - React, Tailwind, and code Playground

HTML

<input type="radio" name="a" checked>
<input type="radio" name="a" class="second">

JavaScript

$('input').on('change',function(){
alert()
})

setTimeout(function(){
$('.second').attr('checked',true)
},2000)