반응형
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
//slideDown , slideUp
$(document).ready(function() {
$("#btn1").click(function() {
$("img").slideUp();
});
$("#btn2").click(function() {
$("img").slideDown();
});
});
</script>
<title>Document</title>
</head>
<body>
<img src="/images/1.png" />
<br /><br />
<button id="btn1">SlideUp</button>
<button id="btn2">SlideDown</button>
</body>
</html>
반응형
'2020 > JQuery' 카테고리의 다른 글
JQuery animate() (0) | 2020.03.01 |
---|---|
JQuery FadeIn(), FadeOut() (0) | 2020.03.01 |
JQuery on, off(이벤트 연결 및 제거) (0) | 2020.02.29 |
JQuery insertAfter, insertBefore 요소추가 (0) | 2020.02.29 |
JQuery 요소 추가(형제관계) (0) | 2020.02.29 |