본문 바로가기
my_lesson/_JQuery

JQuery [hide]클릭하면 사라지는 jquery

by boolean 2013. 8. 16.
728x90

jQuery 강좌 1. 어려운개념은 버리고 바로 시작하기

웹눈님의 블로그에서 배운내용 입니다 jquery를 배우실분은 위 링크를 클릭하십시오

모든 게시글 오른쪽 마우스 열어 놓았읍니다만

드레그해서 가져가면 남는것 아무것도 없읍니다

수동으로 코딩 하십시오


<!DOCTYPE HTML>

<html lang="ko">

<head>

<meta charset="UTF-8">

<title>JQuery 연습장</title>

<link rel="stylesheet" type="text/css" href="jquery.css">//css 파일 불러오기

<script type="text/javascript" src="jquery.js"></script> //script 파일 불러오기

        <script type="text/javascript"> //script 선언

$(document).ready(function(){

$("#hello").click(function(){

$(this).hide();

});

});

</script>

<style type="text/css">   //css 선언

#hello{background:#ff0000; width:100px; position: absolute;}

*{padding:0px; margin:0px;}

body{text-align: center}

div{text-align: center;width:500px;margin:20px auto;}

div p{background: #666666;}

h3{background: #999999;}

address{position:absolute;bottom: 0px;left:0px;}

</style>


<!-- 플로팅 메뉴 : jquery -->


</head>

<body>

<div id="hello">Hello World!</div> //클릭하면 사라질 문구

<h3 id="first">menu</h3>

</body>

</html>



댓글