설 연수
하하호홓
설 연수
전체 방문자
오늘
어제
  • 분류 전체보기 (231)
    • Back-End (2)
      • Java (20)
      • JSP (13)
      • Spring (18)
      • Kotlin (0)
      • node.js (0)
    • Front-End (68)
      • JavaScript (19)
      • jQuery (39)
      • Angular (4)
      • HTML (5)
    • Dev-Ops (12)
      • Linux, Cloud (5)
      • docker, k8s (5)
      • ElasticSeach (2)
    • Other (33)
      • OOP (3)
      • 알고리즘 (2)
      • DB (12)
      • Git (1)
      • Swift (4)
    • Backup (65)

블로그 메뉴

    공지사항

    인기 글

    태그

    • CORS
    • Angular
    • MYSQL
    • Kafka
    • flex
    • RESTful
    • angular4
    • angular callback
    • INVALID
    • jquery invalid
    • 크로스도메인
    • mongodb
    • docker
    • jOOQ
    • page not found
    • Redis
    • 404 error
    • 패스트캠퍼스
    • angular2
    • angular 콜백

    최근 댓글

    최근 글

    티스토리

    hELLO · Designed By 정상우.
    설 연수

    하하호홓

    Front-End/jQuery

    Selectors(접근) - Reference(API)

    2012. 4. 6. 11:16

    jQuery Selectors

    Use our excellent jQuery Selector Tester to experiment with the different selectors.

    SelectorExampleSelects
    *$("*")

    All elements - 모든엘리먼트 접근

    #id$("#lastname")The element with id=lastname - ID로 접근
    .class$(".intro")

    All elements with class="intro" - class로 접근

    element$("p")All p elements - 태그이름으로 접근
    .class.class$(".intro.demo")

    All elements with the classes "intro" and "demo"
    (하위클래스)

       

    :first
    :first-child

    $("p:first")
    $("p:first-child")

    The first p element ( 엘리먼트의 첫번째 )
    모든 p의 첫번째 엘리먼트

    :last
    :last-child

    $("p:last")
    $("p:last-child")

    The last p element ( 엘리먼트의 마지막 )
    모든 p의 마지막 엘리먼트

    :even$("tr:even")

    All even tr elements - 홀수

    :odd$("tr:odd")

    All odd tr elements - 짝수

       
    :eq(index)$("ul li:eq(3)")The fourth element in a list (index starts at 0)
    태그의 몇번째(index)
    :gt(no)$("ul li:gt(3)")

    List elements with an index greater than 3
    태그의 몇번째(no)에서부터 끝까지

    :lt(no)$("ul li:lt(3)")List elements with an index less than 3
    태그의 처음부터 몇번째(no)까지
    :not(selector)$("input:not(:empty)")

    All input elements that are not empty
    태그의 전체에서 특정부분(selector)만 빼고

       
    :header$(":header")

    All header elements h1, h2 ... - <h1><h2>등등 h태그

    :animated$(":animated")

    All animated elements - 애니메이션 걸린 엘리먼트

       
    :contains(text)$(":contains('W3Schools')")All elements which contains the text
    :empty$(":empty")

    All elements with no child (elements) nodes
    child node가 있는지

    :hidden$("p:hidden")All hidden p elements - 숨겨진 엘리먼트
    :visible$("table:visible")All visible tables
       
    s1,s2,s3$("th,td,.intro")All elements with matching selectors
       
    [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]$("[href^='jquery_']")All elements with a href attribute value starting with "jquery_"
       
    :input$(":input")All input elements
    :text$(":text")All input elements with type="text"
    :password$(":password")All input elements with type="password"
    :radio$(":radio")All input elements with type="radio"
    :checkbox$(":checkbox")All input elements with type="checkbox"
    :submit$(":submit")All input elements with type="submit"
    :reset$(":reset")All input elements with type="reset"
    :button$(":button")All input elements with type="button"
    :image$(":image")All input elements with type="image"
    :file$(":file")All input elements with type="file"
       
    :enabled$(":enabled")All enabled input elements
    :disabled$(":disabled")All disabled input elements
    :selected$(":selected")All selected input elements
    :checked$(":checked")All checked input elements

    'Front-End > jQuery' 카테고리의 다른 글

    Effect - Reference(API)  (0) 2012.04.06
    Events - Reference(API)  (0) 2012.04.06
    Selectors - this의 chlildNode 이동하기  (0) 2012.04.06
    Selectors - 요약&정리  (0) 2012.04.05
    이클립스에 jQuery 플러그인 설치하기  (0) 2012.04.05
      'Front-End/jQuery' 카테고리의 다른 글
      • Effect - Reference(API)
      • Events - Reference(API)
      • Selectors - this의 chlildNode 이동하기
      • Selectors - 요약&정리
      설 연수
      설 연수

      티스토리툴바