jQuery 예제 - hide, show, toggle


<!-- 클릭시 show - hide, toggle 효과 테스트 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript"  src="../jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 $("#hideBtn").bind("click", function(){
  $("#description").hide();
 });
 $("#showBtn").bind("click", function(){
  $("#description").show();
 });
 $("#chk").bind("click", function(){
  $("#description").toggle();
 });
});
</script>
</head>
<body>
<div id="description">





</div>

<input type="button" id="hideBtn" value="설명감추기">
<input type="button" id="showBtn" value="설명보기">
<input type="button" id="chk" value="설명보기 토글">
</body>
</html>

댓글

이 블로그의 인기 게시물

db2 user 생성 및 권한 설정

db2 테이블스페이스 확인 및 확장

AIX tape 백업