반응형
SlideToggle (speed, callback) : 슬라이드 업/다운에 대한 토글링
04.SlideToggle.htm |
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<title>슬라이드 업/다운</title>
<style type="text/css">
</style>
<script src="../jQuery/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{ $("#btn").click(function() { //[!1] 숨김-보임-숨김 $("#first").slideToggle('slow'); });
});
</script> </head> <body>
<input type="button" id="btn" value="슬라이드 토글" />
<div id="first" style="display:none;
background-color:Yellow;
height:100px;">
첫번째 영역
</div> </body> </html> |
결과화면 |
[그림51-1] |
반응형
'jQuery | javascript | CSS' 카테고리의 다른 글
53.jQuery - stop 메서드로 다중 효과 구현 ( 08.Effects ) (0) | 2009.11.12 |
---|---|
52.jQuery - animate 메서드로 다중 효과 구현 ( 08.Effects ) (0) | 2009.11.12 |
50.jQuery - slideUp()으로 위로 올려서 숨기기 ( 08.Effects ) (0) | 2009.11.12 |
49.jQuery - fadeIn()과 fadeOut()으로 불투명도 표시 ( 08.Effects ) (0) | 2009.11.12 |
48.jQuery - show()와 hide로 숨기기 및 보이기 ( 08.Effects ) (1) | 2009.11.12 |
Comments