JSFiddle - React, Tailwind, and code Playground

by Harsh Bhatnagar

HTML

<div id="Div_DashBoard">
    <div class="tabGroup">
        <input type="radio" name="tabGroup2" id="rad1" class="tab1" checked="checked" />
        <label for="rad1">Team EPI</label>
        <input type="radio" name="tabGroup2" id="rad2" class="tab2" />
        <label for="rad2">Heat Map</label>
        <br />
        <div class="tab1">test1</div>
        <div class="tab2">test2</div>
    </div>

JavaScript

$(function () {
           if ($('input:radio:checked').length > 0) {
               $('#rad2').attr('checked', true);
                  } else {
               $('#rad1').attr('checked', true);
           }
       });