간단한 슬라이드 jQuery

Last Updated: 2023년 07월 17일 | | 댓글 남기기

클릭하면 숨겨졌던 요소가 슬라이드로 표시되는 기본적인 jQuery 샘플입니다.

예제:

<head>
<style>
#side{
float:right;
width:50px;
height:50px;
background: #428D9B;
}

.hide{
display:none;
}

#slidable{
float:right;
height:50px;
background:#F4F4F4
width:200px;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
jQuery(document).ready(function($) {
$( "#side" ).click(function() {
$('#slidable').animate({width: 'toggle'});
});
})
</script>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
</head>
<body>

<div id="container">
<div id="slidable"class="hide"><b>무엇을 도와드릴까요?</b><br>도움이 필요하세요?</div>
<div id="side">Help</div>
</div>
</body>

여기에서 크드와 실행을 확인해볼 수 있습니다.

(Source: http://stackoverflow.com/)


댓글 남기기

Leave a Comment

할인 소식
Divi 레이아웃 AI 출시 기념 할인!
AI로 이미지, 텍스트, 코딩, 전체 페이지 레이아웃 생성 가능
베스트셀링 워드프레스 테마 Divi
0
0
시간
0
0
Limited Time Offer
You This Coupon Code in Checkout
Click the code to Copy