2. jQuery 선택자(selector)란?
jquery의 핵심은 바로 선택자이다.
주로 사용되는 선택자들이니 꼭암기하여야 한다.
이 글에서는 먼저 종류들을 나열하고
조금씩 다음글을 통해 개념을 설명하도록 하겠다.
1. *
2. #id
3. element
4. element, element, element..
5. .class, .class, .class
6. .class.class 선택자 의미 .intro.member*
7. :first :first-child :first-of-type*
8. :last :last-child :last-of-type*
9. :even :odd
10. :nth-child(n|even|odd|an+b) :nth-of-type(n) *
11. :nth-last-child(n) :nth-last-of-type(n)*
12. :only-child :only-of-type *
13. parent > child
parent child(descendant)
element + next
element ~ siblings
14. :eq(index)
:gt(index)
:lt(index)
:not(selector)
15. :header
:focus
:contains(text)
:has(selector)
:empty
:parent
:hidden
:visible
16. [attribute]
[attribute = value]
[attribute != value]
[attribute $= value]
[attribute ^= value]
[attribute ~= value]
[attribute |= value]
[attribute *= value]
17. :input
:text
:radio
:password
:image
:checkbox
:button
:submit
:reset
:file
18. :enabled 활성화
:disabled 비활성화
:selected 선택된
:checked 체크된