"JQuery 클릭 이벤트"의 두 판 사이의 차이

2번째 줄: 2번째 줄:
;jQuery 클릭 이벤트
;jQuery 클릭 이벤트


==example02.php==
==예시==
*브라우저에서 문서를 모두 읽어들인 후에(ready), 모든 p 태그의 클릭 이벤트(click)에 숨김기능(hide)을 넣었다.
<source lang='html5'>
<source lang='html5'>
<!DOCTYPE html>
<!DOCTYPE html>
23번째 줄: 24번째 줄:
</html>
</html>
</source>
</source>
==해설==
브라우저에서 문서를 모두 읽어들인 후에(ready), 모든 p 태그의 클릭 이벤트(click)에 숨김기능(hide)을 넣었다.
==숙제==
*"클릭하면 사라집니다." 위에 마우스를 올리면 마우스 커서가 손모양이 되도록 해보자.


==같이 보기==
==같이 보기==
*[[jQuery (3)]]
*[[jQuery 이벤트]]
*[[jQuery 이벤트]]
*[[jQuery 모바일 시작하기]]


==참고자료==
==참고자료==
*http://www.w3schools.com/jquery/default.asp
*http://www.w3schools.com/jquery/default.asp
==같이 보기==
*[[jQuery (3)]]
*[[jQuery 모바일 시작하기]]


[[분류: jQuery]]
[[분류: jQuery]]

2014년 11월 27일 (목) 11:47 판

jQuery 클릭 이벤트

1 예시

  • 브라우저에서 문서를 모두 읽어들인 후에(ready), 모든 p 태그의 클릭 이벤트(click)에 숨김기능(hide)을 넣었다.
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("p").click(function(){
$(this).hide();
});
});
</script>
</head>
<body>
<p>클릭하면 사라집니다 1</p>
<p>클릭하면 사라집니다 2</p>
</body>
</html>

2 같이 보기

3 참고자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}