jQuery selector,jQuery 셀럭터, jQuery 선택자

 
 
  •  

1 목록

셀렉터 예시 설명
id, class, tag로 선택 ★★★
* $("*") 모든 요소들
#id $("#lastname") id가 "lastname"인 요소
.class $(".intro") 클래스가 "intro"인 요소들
.class,.class $(".intro,.demo") 클래스가 "intro" 또는 "demo"인 요소들
element $("p") <p> 요소들
el1,el2,el3 $("h1,div,p") <h1>, <div> and <p> 요소들
처음, 마지막, 홀수, 짝수 선택 ★
 :first $("p:first") 첫번째 <p> 요소
 :last $("p:last") 마지막 <p> 요소
 :odd $("tr:odd") 홀수번째 <tr> 요소들
 :even $("tr:even") 짝수번째 <tr> 요소들
자식, 타입에 따른 선택
 :first-child $("p:first-child") All <p> elements that are the first child of their parent
 :first-of-type $("p:first-of-type") All <p> elements that are the first <p> element of their parent
 :last-child $("p:last-child") All <p> elements that are the last child of their parent
 :last-of-type $("p:last-of-type") All <p> elements that are the last <p> element of their parent
:nth-child(n) $("p:nth-child(2)") All <p> elements that are the 2nd child of their parent
 :nth-last-child(n) $("p:nth-last-child(2)") All <p> elements that are the 2nd child of their parent, counting from the last child
:nth-of-type(n) $("p:nth-of-type(2)") All <p> elements that are the 2nd <p> element of their parent
:nth-last-of-type(n) $("p:nth-last-of-type(2)") All <p> elements that are the 2nd <p> element of their parent, counting from the last child
 :only-child $("p:only-child") All <p> elements that are the only child of their parent
 :only-of-type $("p:only-of-type") All <p> elements that are the only child, of its type, of their parent
태그간 관계에 따른 선택
parent > child $("div > p") All <p> elements that are a direct child of a <div> element
parent descendant $("div p") All <p> elements that are descendants of a <div> element
element + next $("div + p") The <p> element that are next to each <div> elements
element ~ siblings $("div ~ p") All <p> elements that are siblings of a <div> element
비교에 따른 선택
 :eq(index) $("ul li:eq(3)") The fourth element in a list (index starts at 0)
 :gt(no) $("ul li:gt(3)") List elements with an index greater than 3
 :lt(no) $("ul li:lt(3)") List elements with an index less than 3
 :not(selector) $("input:not(:empty)") All input elements that are not empty
태그 등에 따른 선택
 :header $(":header") All header elements <h1>, <h2> ...
 :animated $(":animated") All animated elements
 :focus $(":focus") The element that currently has focus
 :contains(text) $(":contains('Hello')") All elements which contains the text "Hello"
 :has(selector) $("div:has(p)") All <div> elements that have a <p> element
 :empty $(":empty") All elements that are empty
 :parent $(":parent") All elements that are a parent of another element
 :hidden $("p:hidden") All hidden <p> elements
 :visible $("table:visible") All visible tables
 :root $(":root") The document’s root element
 :lang(language) $("p:lang(de)") All <p> elements with a lang attribute value starting with "de"
attribute에 따른 선택
[attribute] $("[href]") All elements with a href attribute
[attribute=value] $("[href='default.htm']") All elements with a href attribute value equal to "default.htm"
[attribute!=value] $("[href!='default.htm']") All elements with a href attribute value not equal to "default.htm"
[attribute$=value] $("[href$='.jpg']") All elements with a href attribute value ending with ".jpg"
[attribute|=value] $("[title|='Tomorrow']") All elements with a title attribute value equal to 'Tomorrow', or starting with 'Tomorrow' followed by a hyphen
[attribute^=value] $("[title^='Tom']") All elements with a title attribute value starting with "Tom"
[attribute~=value] $("[title~='hello']") All elements with a title attribute value containing the word "hello"
[attribute*=value] $("[title*='hello']") All elements with a title attribute value containing the string "hello"
input 태그 선택 ★
 :input $(":input") 모든 input 요소들
 :text $(":text") 타입이 "text"인 input 요소들 ★★
 :password $(":password") 타입이 "password"인 input 요소들
 :radio $(":radio") 타입이 "radio"인 input 요소들
 :checkbox $(":checkbox") 타입이 "checkbox"인 input 요소들
 :submit $(":submit") 타입이 "submit"인 input 요소들
 :reset $(":reset") 타입이 "reset"인 input 요소들
 :button $(":button") 타입이 "button"인 input 요소들
 :image $(":image") 타입이 "image"인 input 요소들
 :file $(":file") 타입이 "file"인 input 요소들
 :enabled $(":enabled") enabled인 input 요소들
 :disabled $(":disabled") disabled인 input 요소들
 :selected $(":selected") selected인 input 요소들
 :checked $(":checked") checked인 input 요소들

 

[출처] https://zetawiki.com/wiki/JQuery_%EC%85%80%EB%A0%89%ED%84%B0

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
41 Responsive Web ① – 반응형 웹을 위해 개발자가 꼭 알아야 하는 기술들 file 졸리운_곰 2019.02.08 326
40 서버 사이드 렌더링 그리고 클라이언트 사이드 렌더링 file 졸리운_곰 2018.11.02 801
39 무료 디자인소스 홈페이지들을 소개합니다! file 졸리운_곰 2018.02.27 518
38 스토리보드 템플릿 file 졸리운_곰 2017.10.10 628
37 [웹 기획] 화면 설계 용어 - 와이어프레임, 스토리보드, 프로토타입의 차이점 file 졸리운_곰 2017.10.10 1584
36 웹기획 탄탄한 홈페이지 설계방법 (스토리보드 다운로드) file 졸리운_곰 2017.10.10 2063
35 정보설계(IA : Information Architecture) 졸리운_곰 2016.11.20 330
34 정보 설계 — 웹 사이트 기획 file 졸리운_곰 2016.11.20 756
33 웹 서비스 구축 체크리스트 file 졸리운_곰 2016.10.30 608
32 반응형 웹 기획 file 졸리운_곰 2016.10.27 673
31 [UX 컨설팅] 모 전자 서비스 사례 보고서 secret 졸리운_곰 2016.10.09 0
30 [웹 기획] 기획자가 화면설계서(스토리보드)를 만든다구요? 기획자가 무슨 능력을 가지고 있는데요? 졸리운_곰 2016.10.09 485
29 [UX 디자인] UI 설계도에 해당하는 용어들 file 졸리운_곰 2016.10.09 531
28 [UX 디자인 사례] T모 소프트 "BUX컨설팅소개_V.1.0" file 졸리운_곰 2016.10.09 256
27 [UX 디자인] 사용자 경험(UX)과 사용자 경험 디자인(UX Design) - 위키피디아 정의 살펴보기 file 졸리운_곰 2016.10.08 290
26 [UX 디자인] UX 디자인 조직의 구조와 역할 file 졸리운_곰 2016.10.08 481
25 [UX 디자인] UX 디자인이란? - UI, UX, 인터랙션 디자인의 정의 file 졸리운_곰 2016.10.08 487
24 [UX 디자인] UX(User Experience) 란? UX 디자인 관련 다이어그램 Best 14 file 졸리운_곰 2016.10.08 584
23 [UX 디자인] 7단계 인간행위 모형 - 터치 기기 사용의 행위 모형 file 졸리운_곰 2016.10.08 534
22 [UX 디자인] 애플의 디자인 방법 file 졸리운_곰 2016.10.08 633
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED