Skip to content

Instantly share code, notes, and snippets.

@springcome
Created October 18, 2013 02:21
Show Gist options
  • Save springcome/7035559 to your computer and use it in GitHub Desktop.
Save springcome/7035559 to your computer and use it in GitHub Desktop.
.not, jquery
// selector를 사용할때 원하지 않는 요소를 빼는 방법으로 사용한다.
// type이 button, image를 제외한 요소를 알고자 할때는
$('#contents').not('[type=button],[type=image]').each(function(){
console.log($(this).val());
});
// input에 disabled가 아닌 요소만 알고자 할때
$('#contents').not(':input:disabled').each(function(){
console.log($(this).val());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment