[jQuery] Selecting Checkboxes inside the table
I am having trouble to check the checkboxes contained inside the HTML
table.
Here is the table code:
<table id="chkList" border="0">
<tr>
<td><input id="chkList_0" type="checkbox" name="chkList$0" /><label
for="chkList_0">Item 1</label></td>
</tr><tr>
<td><input id="chkList_1" type="checkbox" name="chkList$1" /><label
for="chkList_1">Item 2</label></td>
</tr><tr>
<td><input id="chkList_2" type="checkbox" name="chkList$2" /><label
for="chkList_2">Item 3</label></td>
</tr>
</table>
I am using the following code to check all the checkboxes but it does
NOTHING!
($("#chkList").children({"input":"checkbox"}).each(function()
{
this.checked = true;
}));