Check ASP.NET checkbox with jQuery
<p>I have following ASP.NET server control checkboxes.</p>

<pre><code>&lt;asp:checkbox id="chkMonS1" runat="server" /&gt;
&lt;asp:checkbox id="chkMonS2" runat="server" /&gt;
&lt;asp:checkbox id="chkAllMon" runat="server" /&gt;
</code></pre>

<p>And also other check boxes.</p>

<pre><code>&lt;asp:checkbox id="chkTueS1" runat="server" /&gt;
&lt;asp:checkbox id="chkTueS2" runat="server" /&gt;
&lt;asp:checkbox id="chkAllTue" runat="server" /&gt;
</code></pre>

<p>So I tried to use jQuery to select all check boxes like so..</p>

<pre><code>&lt;script type="text/javascript"&gt;
        $('chkAllMon').click(
        function () {
            $('chkMonS1').attr('checked', true)
            $('chkMonS2').attr('checked', true)
        }
        )
    &lt;/script&gt;
</code></pre>

<p>However, it doesn't work. Where did it go wrong?</p>
