jQuery 34강 - siblings

dd·2025년 8월 13일

children()

  • 부모의 모든 자식
  • this를 포함한 형제들
  • jQuery 방식

find('>*')

  • 부모의 모든 자식
  • this를 포함한 형제들
  • css 방식

siblings

  • 형제 요소
  • this를 제외한 형제들

find, children은 무조건 부모 parent를 먼저 찾아야 한다.
하지만 siblings는 나 빼고 바로 형제를 찾고 싶을 때 사용

0개의 댓글