설 연수
하하호홓
설 연수
전체 방문자
오늘
어제
  • 분류 전체보기 (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)

블로그 메뉴

    공지사항

    인기 글

    태그

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

    최근 댓글

    최근 글

    티스토리

    hELLO · Designed By 정상우.
    설 연수

    하하호홓

    Front-End/jQuery

    Events - Reference(API)

    2012. 4. 6. 11:25

    jQuery Event Methods

    Event methods trigger, or bind a function to an event for all matching elements.

    Trigger example:

    $("button").click() - triggers the click event for a button element.

    Binding example:

    $("button").click(function(){$("img").hide()}) - binds a function to the click event.

    The following table lists all the methods used to handle events.

    MethodDescription
    bind()Add one or more event handlers to matching elements
    (이벤트 추가, 현재) * 기존객체만 이벤트지정 *
    blur()Triggers, or binds a function to the blur event of selected elements (포커스가 이동할때)
    change()Triggers, or binds a function to the change event of selected elements (값이 변경되었을때)
    click()Triggers, or binds a function to the click event of selected elements (클릭햇을때)
    dblclick()

    Triggers, or binds a function to the dblclick event of selected elements (더블클릭했을때)

    delegate()

    Add one or more event handlers to current, or future, specified child elements of the matching elements
    (이벤트 추가, 현재,미래)
    * live와 같으나 delegate가 퍼포먼스가 더 좋다함 *

    die()

    Remove all event handlers added with the live() function 
    (이벤트를 삭제시킬때, live()와 반대)

    error()Triggers, or binds a function to the error event of selected elements (에러발생시 이벤트발생)
    event.currentTargetThe current DOM element within the event bubbling phase
    event.dataContains the optional data passed to jQuery.fn.bind when the current executing handler was bound
    event.isDefaultPrevented()

    Returns whether event.preventDefault() was called for the event object 
    default행동을 막을때 사용(막아졋으면 true/ 반대시 false)

    event.isImmediatePropagationStopped()Returns whether event.stopImmediatePropagation() was called for the event object
    event.isPropagationStopped()Returns whether event.stopPropagation() was called for the event object
    event.pageXThe mouse position relative to the left edge of the document (마우스 x좌표)
    event.pageYThe mouse position relative to the top edge of the document (마우스 y좌표)
    event.preventDefault()

    Prevents the default action of the event 
    (default행동을 막아주는 이벤트)

    event.relatedTargetThe other DOM element involved in the event, if any
    event.result

    This attribute contains the last value returned by an event handler that was triggered by this event, unless the value was undefined (이벤트의 마지막값을 출력한다)

    event.stopImmediatePropagation()Prevents other event handlers from being called
    event.stopPropagation()Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event
    event.targetThe DOM element that initiated the event
    (접근한 타겟의 속성에 접근할수있다)
    event.timeStamp

    This attribute returns the number of milliseconds since January 1, 1970, when the event is triggered
    (1970년  1월 1일 부터 밀리초의 수를 포함합니다)

    event.type

    Describes the nature of the event
    (이벤트 타입을 알수있게 해준다)

    event.whichWhich key or button was pressed for a key or button event (키보드에서 어떤키를 눌럿는지 키넘버값을 출력)
    focus()

    Triggers, or binds a function to the focus event of selected elements (포커스가 갓을때 이벤트발생)

    focusin()Binds a function to the focusin event of selected elements (포커스가 들어갓을때)
    focusout()Binds a function to the focusout event of selected elements (포커스에서 빠져나올때
    hover()

    Binds one or two functions to the hover event of selected elements (마우스를 올렷을때, 땟을때 이벤트 발생)

    keydown()Triggers, or binds a function to the keydown event of selected elements (키보드를 누르고있을때)
    keypress()

    Triggers, or binds a function to the keypress event of selected elements (삽입되엇을때?? 엔터쳣을때인거같다)

    keyup()

    Triggers, or binds a function to the keyup event of selected elements (키보드를 눌렀다가 뗏을때)

    live()

    Add one or more event handlers to current, or future, matching elements (이벤트를 지정할때, die()와 반대)
    ** 새로생성되는 DOM객체도 이벤트가 적용된다. **

    load()Triggers, or binds a function to the load event of selected elements (로드됫을때, 문서나 이미지를 다 읽엇을때)
    mousedown()

    Triggers, or binds a function to the mouse down event of selected elements (클릭하고있을때, 클릭했을때)

    mouseenter()

    Triggers, or binds a function to the mouse enter event of selected elements (마우스커서를 올렸을때)

    mouseleave()Triggers, or binds a function to the mouse leave event of selected elements (마우스커서를 뗏을때)
    mousemove()

    Triggers, or binds a function to the mouse move event of selected elements (마우스커서가 이동할때

    mouseout()

    Triggers, or binds a function to the mouse out event of selected elements (개체에서 마우스커서가 벗어낫을때)

    mouseover()Triggers, or binds a function to the mouse over event of selected elements (마우스커서를 올려놨을때)
    mouseup()

    Triggers, or binds a function to the mouse up event of selected elements (마우스를 클릭했다가 뗏을때)

    one()Add one or more event handlers to matching elements. This handler can only be triggered once per element
    (이벤트를 한번만 실행시킬때) * 한번만!!! *
    ready()Binds a function to the ready event of a document
    (when an HTML document is ready to use)
    (페이지가 완전이 로드되었을때 이벤트발생)
    resize()Triggers, or binds a function to the resize event of selected elements (윈도우창 사이즈 조절할때)
    scroll()Triggers, or binds a function to the scroll event of selected elements (스크롤바 움직일때)
    select()

    Triggers, or binds a function to the select event of selected elements (선택(블록지정) 햇을때)

    submit()

    Triggers, or binds a function to the submit event of selected elements (submit버튼 눌렀을때)

    toggle()Binds two or more functions to the toggle between for the click event for selected elements (토글방식으로 이벤트줄때)
    trigger()

    Triggers all events bound to the selected elements
    (강제로 이벤트 발생)

    triggerHandler()

    Triggers all functions bound to a specified event for the selected elements (강제이벤트발생, 일치하는 첫번째요소만)

    unbind()Remove an added event handler from selected elements
    (bind한 이벤트 제거)
    undelegate()

    Remove an event handler to selected elements, now or in the future (delegate한 이벤트 제거)

    unload()

    Triggers, or binds a function to the unload event of selected elements (객체가 unload될때, 페이지 떠날때)


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

    jQuery mobile jQuery Mobile - 구조 & 문법  (0) 2012.04.10
    Effect - Reference(API)  (0) 2012.04.06
    Selectors(접근) - Reference(API)  (1) 2012.04.06
    Selectors - this의 chlildNode 이동하기  (0) 2012.04.06
    Selectors - 요약&정리  (0) 2012.04.05
      'Front-End/jQuery' 카테고리의 다른 글
      • jQuery mobile jQuery Mobile - 구조 & 문법
      • Effect - Reference(API)
      • Selectors(접근) - Reference(API)
      • Selectors - this의 chlildNode 이동하기
      설 연수
      설 연수

      티스토리툴바