can someone help me with some traversing and some logic here please. the logic is this:
- if any checkbox in column3 is checked then check the first column checkbox.
- if none in column 3 is selected, uncheck checkbox in column1
-
if column1 checkbox is unchecked, then uncheck all checkboxes in column3
<table> <tr> <td><input class="isSelected" type="checkbox" /></td> <td>row1col2</td> <td><input class="actionItem" type="checkbox" /><input class="actionItem" type="checkbox" /></td> </tr> <tr> <td><input class="isSelected" type="checkbox" /></td> <td>row2col2</td> <td><input class="actionItem" type="checkbox" /><input class="actionItem" type="checkbox" /></td> </tr> <tr> <td><input class="isSelected" type="checkbox" /></td> <td>row3col2</td> <td><input class="actionItem" type="checkbox" /><input class="actionItem" type="checkbox" /></td> </tr> </table>
Here’s one approach: http://jsfiddle.net/mblase75/NDh2g/