Check group

by Ground_Zero

HTML

<table style="border:2px solid #006633" bgcolor="#CCBFA3"; id="my_table">
    <tr><td colspan=2><input type="checkbox" name="bundle_1" id="bundle_1" value="true" /> Saline Lock Orders</td></tr>
  <tr><td width="20px"></td>
  <td><table>
    <tr>
      <td class="bundle_1"><input type="checkbox" name="ord_59" id="orderId_59" value="true" class="bundle_1"/> Insert IV / Saline Lock
      </td>
    </tr>
    <tr>
      <td class="bundle_1"><input type="checkbox" name="ord_60" id="orderId_60" value="true" class="bundle_1"/> Normal Saline Flush 0.9% Syringe 10 milliliter IV Every 8hrs 
      </td>
    </tr>
    <tr>
      <td class="bundle_1"><input type="checkbox" name="ord_61" id="orderId_61" value="true" class="bundle_1"/> Normal Saline 0.9% Syringe 10 milliliter IV PRN<br>
          <div style="padding-left: 2em">
           <label> Indication:&nbsp;&nbsp;
              <select name="cprompt_61_1">
                <option value="flush after Access and/or Meds">flush after Access and/or Meds</option>
                <option value="flush after Meds">flush after Meds</option>
              </select>
            </label>
          </div>
      </td>
    </tr>
  </table>

CSS

body{
 background-color:#D1D1D1;  
 font-size: 62.5%; 
 margin: 30px;
}
td{
 text-align:left;
 font-family: Tahoma, Verdana, sans serif;
 font-size: 10pt;
 vertical-align:top;
}
td.checked { background: yellow; }

JavaScript

// Saline Lock Orders

$(function() {
    $("#bundle_1").click(all_cb1);
});

function all_cb1() {
    if (this.checked) {
        $("input.bundle_1").attr("checked", true);
        $("input.bundle_1").parent("td").addClass("checked");
        this.removeclass("checked");
    } else {
        $("input.bundle_1").attr("checked", false);
        $("input.bundle_1").parent("td").removeClass("checked");
        this.removeclass("checked");
    }

}

$(function() {
    $("input.bundle_1").click(function() {
        $('#bundle_1').attr('checked', false);
    });
});

$("input:checkbox").click(function() { $(this).parent("td").toggleClass("checked");
});