-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfadeToggleEffects.html
More file actions
28 lines (24 loc) · 881 Bytes
/
fadeToggleEffects.html
File metadata and controls
28 lines (24 loc) · 881 Bytes
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
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
//fadeToggle contains a two parameters -Speed and callback function
$("#div1").fadeToggle();
//slow or fast or it can any number(withour Quotes)
$("#div2").fadeToggle("fast");
$("#div3").fadeToggle(3000);
});
});
</script>
</head>
<body>
<p>Demonstrate fadeToggle() with different parameters.</p>
<button>Click to fadeIn() and fadeOut() boxes</button><br><br>
<div id="div1" style="width:80px;height:80px;background-color:red;"></div><br>
<div id="div2" style="width:80px;height:80px;background-color:green;"></div><br>
<div id="div3" style="width:80px;height:80px;background-color:blue;"></div>
</body>
</html>