n번째 자식 찾기1 jQuery API 정복 - n번째 자식요소 찾기 : nth-child :nth-child() 는 자식 요소 집합에서 선택한 색인에 위치한 자식을 찾는 요소입니다. 원문 링크 http://api.jquery.com/nth-child-selector/ nth-child selector jQuery(':nth-child(index/even/odd/equation)') index 1이 초기값이며 색인에 맞는 자식 요소를 찾는다. even, odd, equation 이라는 문자열도 사용할 수 있음. (예. :nth-child(event), :nth-child(4n)) :nth-child(n) 선택자는 CSS 사용법에서 파생된 jQuery의 문법이기 때문에, n 은 "1부터 시작"한다. 그러나 jQuery의 어떤 함수들은 JavaScript의 "0이 시작"인 인덱스 구조를 따른다. .. 2011. 2. 16. 이전 1 다음