jQuery - unselecting checkbox if conditions match
<p>I have a bit of a problem with some html im writing and was wondering if someone could help.</p>

<p>I have 6 checkboxes which are the following</p>

<p>Monday
Tuesday
Wednesday
Thursday
Friday
All Days</p>

<p>HTML is as follows:</p>

<pre><code>&lt;input type="checkbox" name="monday" value="1" id="monday" /&gt;
&lt;input type="checkbox" name="tuesday" value="1" id="tuesday" /&gt;
&lt;input type="checkbox" name="wednesday" value="1" id="wednesday" /&gt;
&lt;input type="checkbox" name="thursday" value="1" id="thursday" /&gt;
&lt;input type="checkbox" name="friday" value="1" id="friday" /&gt;
&lt;input type="checkbox" name="alldays" value="1" id="alldays" /&gt;
</code></pre>

<p>I already have some jquery which when "All Days" is selected, checks all the rest of the checkboxes.</p>

<p>The jQuery i have at the moment is as follows:</p>

<pre><code>                    &lt;script&gt;
                    $(function(){
                        $("#alldays").change(function(){
                            if (this.checked) {
                                $("input:checkbox.child").attr("checked", "checked");
                            }
                            else {
                                $("input:checkbox.child").removeAttr("checked");
                            }
                        });
                    });
                &lt;/script&gt;
</code></pre>

<p>I want to add another bit of jQuery, if all six of the checkboxes are ticked, and someone clicks off one of the weekdays, the "All Days" checkbox will automatically uncheck.</p>

<p>Could someone help me out with this please.</p>

<p>Cheers</p>
