Hi

I'm using this to check/uncheck a group of checkboxes which works
fine.  However, when all of checkboxes are checked, I would like the
span id="CheckAll" to read "Uncheck All" and to toggle back to "Check
All" when all of the boxes are unchecked.

<script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function() {
            $('#chkAll').click(
             function() {
                $("INPUT[type='checkbox']").attr('checked', $
('#chkAll').is(':checked'));
            });
         });
</script>

<tr>
        <td><input name="chkAll" id="chkAll" type="checkbox" Checked /></td>
        <td class="style2"><em><strong><span id="CheckAll">Check All</span></
strong></em></td>
</tr>

Thanks

Reply via email to