나는 이와 같은 테이블을 가지고 있고 각 열에 체크 박스가 있고 각 열에 체크 박스가 있습니다. 그래서 내가 행/테이블 헤더의 체크 박스를 체크하면 각 td의 데이터 옆에 진드기 마크 이미지를 보이거나 숨기고 싶다. 선택을 취소하면 눈금 표시가 숨겨져 야합니다. 이것의jQuery 체크 박스에 체크 표시/숨기기 이미지
데모 :
//Monitor the main checkbox ($("#macDaddyCheckbox")) for changes
$("#macDaddyCheckbox").change(function(){
if($(this).is(":checked")){
//It is checked, so hide the other checkboxes
$(".babyCheckboxes").hide();
} else {
//It is not chceked, so show the other checkboxes
$(".babyCheckboxes").show();
}
});
편집 : http://jsfiddle.net/MpzXU/3/
<table id="example">
<thead>
<tr>
<th></h>
<th>PO Number</th>
<th>Hangtag<input type="checkbox" value="hangtag" class="ht_chkbx"/></th>
<th>Care Label<input type="checkbox" value="Care Label" class="cl_chkbx"/></th>
<th>UPC<input type="checkbox" value="UPC" class="upc_chkbx"/></th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" name="checkbox2" id="checkbox2"></td>
<td>6711112</td>
<td>1</td>
<td>20</td>
<td>17</td>
</tr>
</tbody>
</table>
안녕 Nahom입니다. 우리가 당신을 도울 수 있도록 그것을 개정하십시오. –
@Ian 질문을 업데이트하고 데모를 추가하십시오 ... – Ravi