Recent Posts
Link
«   2025/02   »
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
관리 메뉴

공부하자

제이쿼리(J-Query) 이벤트 메소드 click() 본문

J-Query·JavaS

제이쿼리(J-Query) 이벤트 메소드 click()

bluemoon527 2021. 1. 8. 20:09

제이쿼리 click 이벤트 메소드

: 클릭 이벤트가 발생했을 때 다양한 효과를 넣을 수 있는 이벤트 메소드

 

 

* 이벤트란?

웹 페이지가 응답 할 수있는 모든 방문자의 행동

 

 

 

문법

$("selector").click(function(){

  // code

});

 

 

 

ex.

$(".wrap .box").click(function(){  //click을 햇을 때

  $(".wrap .box").animate({

    height:"400px",

    width:"400px"

  }, 5000);    //animate 에도 시간의 개념이 필요하다

});

 

 

 

 

 

dbclick() 이벤트

: 더블 클릭에 대한 이벤트

 

 

문서

$("selector").dbclick(function(){

  //code

});

 

 

ex.

$("p").dblclick(function(){
  $(this).hide();
});

 

 

 

 

 

www.w3schools.com/jquery/jquery_events.asp

 

jQuery Event Methods

jQuery Event Methods jQuery is tailor-made to respond to events in an HTML page. What are Events? All the different visitors' actions that a web page can respond to are called events. An event represents the precise moment when something happens. Examples:

www.w3schools.com

 

 

Comments