<html lang="ko">
<head>
<meta charset="UTF-8">
<title>jQuery Effect Handling</title>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<style>
#divBox {
width: 100px;
height: 100px;
background-color: yellow;
border: 5px solid red;
margin-top: 20px;
}
</style>
<script>
$(function() {
$("#startBtn").on("click", function() {
// id가 "divBox"인 요소를 0.5초에 걸쳐 사라지게 하고
// 1초의 지연시간 뒤에 다시 2초에 걸쳐 나타나게 함.
$("#divBox").fadeOut(500).delay(1000).fadeIn(2000);
});
});
</script>
</head>
<body>
<h1>이펙트 효과의 지연 설정</h1>
<button id="startBtn">이펙트 효과 시작!</button>
<div id="divBox"></div>
</body>
</html>