Disable check boxes under the main div jquery
<pre><code> &lt;div class="ex" id="baseTypes"&gt;
                            &lt;table&gt;
                                &lt;tr&gt;

                                &lt;?php foreach ($transTypeList as $list) {
                                ?&gt;&lt;tr&gt;
                                        &lt;td&gt;
                                            &lt;input id="chkTransTypeBsn" style="vertical-align:baseline" name="chkTransTypeBsn[]" type="checkbox"   value="&lt;?php echo $list-&gt;trn_typ_code; ?&gt;"  /&gt;
                                        &lt;/td&gt;
                                        &lt;td width="100px;"&gt;

                                    &lt;/td&gt;
                                    &lt;td&gt;
                                        &lt;input id="chkBsnPreivous" style="vertical-align:baseline" name="chkBsnPreivous" type="checkbox"   value="1"  /&gt;
                                    &lt;/td&gt;
                                &lt;/tr&gt;
                            &lt;?php
                            ?&gt;

                            &lt;?php
                                    }
                            ?&gt;
                                    &lt;/tr&gt;
                                &lt;/table&gt;
</code></pre>

<p>This is  my code i want to disabled all the checkboxes onclick buttoon</p>

<p>my jquery is not working up to now any help </p>

<pre><code>var checked = $("#ChkIsbsTxn").attr("checked");
                if(checked){
                   $("#baseTypes : input").attr("disabled", true);
                }else{
                    $("#baseTypes : input").attr("disabled", false);
                }
</code></pre>
