JQuery Check/Uncheck a checkbox group

Check/Uncheck a checkbox group using JQuery

When you have a checkbox group where the name is an array you can use this script to check/uncheck all the entire group


Header, remember to include the JQuery library:

<script type="text/javascript" src="jquery-1.4.4.min.js">
<script type="text/javascript">
        $(document).ready(function() {
            function() {
            $('input[type=checkbox]').attr('checked', 'true');
            function() {



Javascript supports the following programming paradigms:<br>
<input type="checkbox" name="paradigm[]" value="Imperative">Imperative<br>
<input type="checkbox" name="paradigm[]" value="Object-Oriented">Object-Oriented<br>
<input type="checkbox" name="paradigm[]" value="Functional">Functional<br><br>        
<input type="checkbox" id="chkAll">Select All<br>

That simple!