JSFiddle - React, Tailwind, and code Playground

JavaScript

$("<input type='radio' value='1st' name='test1' /><input type='radio' value='2nd' name='test1' /><input type='radio' value='3rd' checked='checked' name='test1' />")
    .appendTo("body");  

if ( $("input:checked").length ) 
    $("body").append("===============================");