JSFiddle - React, Tailwind, and code Playground

by Akram kamal

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>

<body>

<span class="text-block"><br /></span>
<a class="question-heading" name="A45" id="A45">26. </a><span class="question-text">Early childhood education assessments can serve many different purposes. Below is a list of reasons that assessments are sometimes used. Please indicate which reasons your {Early Learning Coalition/Redwoods Christian Migrant Association/Head Start grantee} uses {Assessment #X}.</span>
<div align="left" class="response-set">
<table id="TQ45" border="1" rules="all" cellspacing="0" cellpadding="3"  width="50%">
  <colgroup class="topic-col" span="1" width="20%" />
  <colgroup id="Q45_A_COLNORM" class="colA" span="2" width="40%" />
  <thead>
    <tr align="center"><th></th>
      <th id="Q45_A_C1" name="Q45_A_C1" class="choice-row">Yes</th>
      <th id="Q45_A_C2" name="Q45_A_C2" class="choice-row">No</th>
    </tr>
  </thead>
  <tbody>
    <tr id="Q45T1" class="odd-row" align="center"><td nowrap="nowrap" align="left">Diagnostic</td>
      <td><input type="radio" name="Q45_A_1" value="1" id="Q45_A_1_1" /></td>
      <td><input type="radio" name="Q45_A_1" value="2" id="Q45_A_1_2" /></td>
    </tr>
    <tr id="Q45T2" class="even-row" align="center"><td nowrap="nowrap" align="left">Screening (e.g., determine service eligibility)</td>
      <td><input type="radio" name="Q45_A_2" value="1" id="Q45_A_2_1" /></td>
      <td><input type="radio" name="Q45_A_2" value="2" id="Q45_A_2_2" /></td>
    </tr>
    <tr id="Q45T3" class="odd-row" align="center"><td nowrap="nowrap" align="left">To inform instructional or curricular practices</td>
      <td><input type="radio" name="Q45_A_3" value="1" id="Q45_A_3_1" /></td>
      <td><input type="radio" name="Q45_A_3" value="2" id="Q45_A_3_2" /></td>
    </tr>
    <tr id="Q45T4" class="even-row" align="center"><td nowrap="nowrap" align="left">Monitor children's progress</td>
      <td><input type="radio" name="Q45_A_4"...

JavaScript

$('input[name="Q45_A_8"]').change(function() {
    if(1 == $(this).val()) {
        $('#myDiv').show();
    } else {
        $('#myDiv').hide();
    }
});