jQuery :not Selector
- 카테고리 없음
- 2014. 11. 4.
:not Selector
해당 셀렉터 빼고 반환
//체크안된 체크박스모음 다음 요소가 span인것들의 배경색 변경
$('input:not(:checked)').find(' + span').css('background-color', 'yellow');
// 같은 결과를 내는 다른 방법
$('input:not(:checked)').find(' + span').css('background-color', 'yellow');
$('input').not(':checked').find(' + span').css('background-color', 'yellow');
참고
http://api.jquery.com/not-selector/