2013-06-10 2 views
4

checked checkboxes을 찾고 이에 따라 각 행을 편집하는 다음 루프가 있습니다. 나는 체크 박스가 체크되지 않은 테이블을 통해 루프를 원하는checkbox가 체크되지 않은 jquery + html 테이블 행을 통한 루프

$("table.authors-list").find('input[type="checkbox"][name^="treated"]:checked').each(function() { 
    var row = $(this).closest('tr'), 
     priceInput = row.find('input[name^="transportprice"]'); 

    priceInput.val(treatedtransportcostperton.toFixed(2)); 
}); 

:checked의 반대는 무엇인가?

미리 감사드립니다.

+4

': not ('checked ')'. –

답변

5

사용 :not selector :

$("table.authors-list") 
    .find('input[type="checkbox"][name^="treated"]:not(:checked)') 
    .each(function() {...}); 
1

그냥 사용 선택기

으로 시도

$ ("table.authors 목록") 찾기 ('입력 [유형 = "체크 박스"] 이름 = "치료 ^. "] : not (: checked) '). 각 (function() {

}