ADD
![[jQuery] 요소 탐색 메서드](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdna%2FcGTEyM%2FbtqExZbvCeE%2FAAAAAAAAAAAAAAAAAAAAABSNK6j0SMKJ0c4sC-cGOaNcOQlnLBPDMBTTbwYDMZu2%2Fimg.png%3Fcredential%3DyqXZFxpELC7KVnFOS48ylbz2pIh7yKj8%26expires%3D1753973999%26allow_ip%3D%26allow_referer%3D%26signature%3D%252BcYagO79ciq9M%252F8E4foiW7Uh3n0%253D)
[jQuery] 요소 탐색 메서드
jQuery는 문서의 특정 요소를 선택하거나 탐색할 때 필요한 몇 가지 메서드를 지원하고 있습니다. (1) filter filter는 필터선택자를 통해 요소를 선택할 수 있도록 합니다. 필터 선택자에 대해선 아래 글을 참고해 주세요. [Web/JQuery] - [jQuery] 선택자 아래 예제는 filter메서드를 이용해 다수의 span에서 2번째 요소를 가져와 배경색을 변경합니다. 자동차 자전거 비행기 배 오토바이 또는 다음과 같이 메서드를 추가해 사용할 수도 있습니다. $(function () { $('span').filter(function (index) { return index == 1; }).css({ color: 'red' }); }); (2) end end는 문서의 탐색상태를 이전으로 되돌..