jQuery 쿠키 굽는 법;;

  • 이온디
  • 2013.08.09 14:37:01
  • 0

왼쪽에 레이어 숨겨뒀다가 숑하고 보여주는 코드는 찾았습니다.

그런데, 쿠키는 어떻게 구워주나요?


해당 코드는 이렇습니다.

제가 막무가내로 쓴 코드라-_-; 혹시 잘못된 부분 있음 알려주시구요;;


<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>animate demo</title>
<style>
.block {
position: relative;
background-color: #abc;
width: 400px;
height: 40px;
float: left;
left:-400px;
display:none;
}
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>

<div style="position:absolute; left:0px;"> 
<div id="go" style="background:red;width:20px;height:100%;float:right;text-align:center;">»</div>
<div class="block">

$( "p" ).animate({
height: "toggle",
opacity: "toggle"
}, {
duration: "slow"
});

$( "p" ).animate({
height: "toggle",
opacity: "toggle"
}, "slow" );
</div>
</div>

<script>
$( "#go" ).click(function() {
$( ".block" ).animate({
width: "toggle",
left: 0
}, {
duration: 1000,
step: function( now, fx ){
$( ".block:gt(0)" ).css( "left", now );
}
});
});
</script>

</body>
</html>

태그목록

  • 없음

첨부파일 목록

  • 없음
목록으로 돌아가기
댓글 쓰기