JSFiddle - React, Tailwind, and code Playground

by Afzaal Ahmad Zeeshan

HTML

<input type="radio" name="something" />
<button>Checked</button>

JavaScript

$('button').click(function () {
    if($('input[type=radio]').prop('checked', true)) {
        $(this).html('Checked!');
    } else {
        $(this).html('Unchecked');
    }
})