-
Notifications
You must be signed in to change notification settings - Fork 0
/
fade.html
28 lines (28 loc) · 1.06 KB
/
fade.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://code.jquery.com/jquery-3.7.1.js" integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="bootstraplink2v5.0.min.css">
<title>Document</title>
</head>
<body class="container mt-3">
<div class="box" style="width: 300px; height: 300px; background-color: yellowgreen;"></div>
<button id="btnFadeOut" class="btn btn-danger mt-2">FadeOut</button>
<button id="btnFadeIn" class="btn btn-success mt-2">FadeIn</button>
<button id="btnFadeToggle" class="btn btn-warning mt-2">FadeToggle</button>
</body>
<script>
$(document).ready(function(){
$("#btnFadeOut").click(function(){
$(".box").fadeOut(1000);
})
$("#btnFadeIn").click(function(){
$(".box").fadeIn(1000);
})
$("#btnFadeToggle").click(function(){
$(".box").fadeToggle(1000);
})
});
</script>
</html>