-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanimating content.html
68 lines (37 loc) · 1.32 KB
/
animating content.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<html>
<head>
<title>jQuery</title>
<script type="text/javascript" src="jquery-3.4.1.min.js"></script>
<style type="text/css">
#circle {
width: 150px;
height: 150px;
border-radius: 50%;
background-color: green;
margin: 10px;
}
.square {
width: 150px;
height: 150px;
background-color: red;
margin: 10px;
}
</style>
</head>
<body>
<div id="circle"></div>
<script type="text/javascript">
$("#circle").click(function() {
$(this).animate({width:"400px",
height:"400px",
marginLeft:"100px",
marginTop:"100px"},2000,function()
{
$(this).css("background-color","red");
}
);
// $(this).css("background-color","red");
});
</script>
</body>
</html>