확인란이있는 간단한 테이블이 있습니다. 확인되면 - 행의 색상을 변경해야합니다. 순간 부모 배경을 전환하는 방법?
<tr height="35">
<td><input type="checkbox" ></td>
<td>Name</td>
<td>Surname</td>
</tr>
은 내가
jQuery('input[type="checkbox"]').click(function(){
jQuery(this).parent().parent().css('background-color', 'red');
});
함께 할하지만 난 .parent().parent()
좋은 생각이 아니라고 생각 ... 또한 배경을 전환 할 수있는 방법은? 어쩌면 어떻게 든 변화하는 개미에 대한 점검이나 해고가 아닌가?