반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
Tags
- 플러그인설치방법
- Wordpress
- 반려견
- 영카트
- 워드프레스
- 반응형웹
- MySQL
- 댕댕이
- 반응형홈페이지
- 기업홈페이지제작
- 워드프레스소개
- 네이버웹마스터도구
- 무료호스팅서버
- Linux
- html5
- 워드프레스홈페이지제작
- 병원홈페이지제작
- 제이쿼리
- 자바스크립트
- 그누보드
- 무료호스팅
- 웹호스팅
- 닷홈
- 카페24
- 워드프레스플러그인
- 워드프레스란?
- css3
- php
- JavaScript
- jQuery
Archives
- Today
- Total
pm1122dev의 비밀노트
[Jquery] 자식요소 찾기 children() 본문
728x90
반응형
api.jquery.com/children/#children-selector
.children() | jQuery API Documentation
Description: Get the children of each element in the set of matched elements, optionally filtered by a selector. Given a jQuery object that represents a set of DOM elements, the .children() method allows us to search through the children of these elements
api.jquery.com
children()은 자식 선택된 요소의 자식요소를 반환합니다.
간단한 예를 보시면 이해가 가실겁니다.
html
<div class="parent">
<p class="child">자식요소</p>
</div>
jquery
$(function(){
childEl = $(".parent").children();
console.log(childEl);
//결과
<p class="child">자식요소</p>
})728x90
반응형
'javascript&jquery' 카테고리의 다른 글
| [Jquery] element 내용 비우기 empty() (0) | 2021.04.26 |
|---|---|
| [Jquery] append, appendTo 차이점 (0) | 2021.04.26 |
| slick.js 에러 $(...).slick is not a function 해결방법 (0) | 2021.04.09 |
| [jquery] 부모창 제어 opener, parent (0) | 2021.02.04 |
| [jquery] element가 동적으로 추가됐을 경우 이벤트 주기 (1) | 2021.02.01 |
Comments