checkbox
無効な要素を除くすべての要素を選択したいのですが、
これは私のHTMLです
<input id="chkSelectAll" class="checkbox" type="checkbox" />Select All
<div id="ContentPlaceHolder1_listItem_pnlDis_0">
<input id="checkApproved" type="checkbox" name="checkApproved" checked="checked" disabled="disabled">
</div>
<div id="ContentPlaceHolder1_listItem_pnlDis_8" class="dis">
<input id="checkApproved" type="checkbox" name="ctl00$ContentPlaceHolder1$listItem$ctrl8$checkApproved">
</div>
jQuery
$('#chkSelectAll').click(function () {
var checked_status = this.checked;
// alert(checked_status);
$('div#item input[type=checkbox]').each(function () {
this.checked = checked_status;
});
})
すべての要素を選択するために機能していcheckbox
ますが、無効になっている要素をスキップしたいです。
どうやってやるの?