에있는 모든 체크 박스를 확인 나는이 같은 테이블 설정이 있습니다jQuery를
<table>
<thead>
<th>
<input type="checkbox" class="check-all" />
</th>
<th>
Title
</th>
</thead>
<tbody>
<tr>
<td><input type="checkbox" /></td>
<td>Name</td>
</tr>
<tr>
<td><input type="checkbox" /></td>
<td>Name 2</td>
</tr>
</tbody>
</table>
내가 '체크인을 모두'클래스 헤더의 체크 박스가 선택되어 있으므로 때 가지고 노력하고, 모든 확인 아래 체크 박스.
이 내가 무슨이지만
$('.check-all').click(
function(){
$(this).parent().parent().parent().find("input[type='checkbox']").attr('checked', $(this).is(':checked'));
}
)
어떤 아이디어를 작동하지 않는 것? 고맙습니다!