티스토리 뷰
Traversing이란?
DOM tree를 "move through"하는 것이다, 즉 각 element들이 맺고 있는 parent, child, sibling, ancestor, descendant 등의 관계에서 사이 사이를 지나는 것이다.
- parent()
$("span").parent().css({
"color" : "red",
"border" : "2px solid red"});
});
- parents() : 지정한 element 상위의 모든 element에 적용된다, 그 중에서 filtering 하고 싶다면 parents() 파라미터 값에 selector를 적어주면 된다
- parentsUntil()
- children()
- 첫번째 child만 선택하고 싶다면 .first
예) children("p.first")
- 첫번째 child만 선택하고 싶다면 .first
- find()
- 모든 child element를 선택하고 싶다면 .find("*")
- siblings()
- next()
- nextAll()
- nextUntil()
- prev()
- prevAll()
- prevUntil()
Filtering
- first()
- last()
- eq(): 인덱스 값에 따른 검색 결과
- filter()
- not()
'jQuery' 카테고리의 다른 글
jQuery Review: on( ) (0) | 2020.07.31 |
---|
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- HTML #id #iframe
- javascript #datatype
- links lists tables display
- css
- JSP환경구축
- DB4free
- DynamicWebProject
- 2020Camp
- HTML #Canvas #SVG
- Block_element #inline_element
- HTML #CSS
- jsp
- JSP_CRUD
- box_model
- 인용문 #주석
- head #title #style
- text_shadow
- meta #link #script #base #HTML
- Mavenproject
- annotation
- HTML #media #video #YouTube
- HTML_Forms
- fontstyle
- HTML_Formatting
- html
- HTML #Tables
- HTML #class
- HTML #Headings #Paragraph #Styles
- UserBean
- STS4
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함