-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFade-Call-Chain.html
More file actions
44 lines (38 loc) · 939 Bytes
/
Copy pathFade-Call-Chain.html
File metadata and controls
44 lines (38 loc) · 939 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
<style>
#para{
font-family: 'Times New Roman', Times, serif;
color: blue;
height: 2px;
}
</style>
<body>
<div id="li">
<ul>
<li>fifth</li>
<li>fourth</li>
<li>third</li>
<li>second</li>
<li>first</li>
</ul>
</div>
<div id="box" style="background:#98bf21;height:100px;width:100px;margin:6px;"></div>
<button id="but" type="submit">click me</button>
<script src="jq\jquery-3.4.1.js"></script>
<script>
/*$("#but").click(function(){
$("#li").fadeOut(6000);
alert("done");
})//before fadeout the alert box will execute so callback is used
*/
/*$("#but").click(function(){
$("#li").fadeOut(3000,function(){
alert("done");
});
})//callback*/
$("#but").click(function(){
$("li").fadeOut(2000).fadeIn(2000).slideUp();
})//chaining
</script>
</body>
</html>