Skip to content

Commit 75c2749

Browse files
committed
animate(....) ⏩
1 parent a7b2221 commit 75c2749

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
6+
<script>
7+
$(document).ready(function () {
8+
$("button").click(function () {
9+
var div = $("div");
10+
div.animate({ height: '300px', opacity: '0.4' }, "slow");
11+
div.animate({ width: '300px', opacity: '0.8' }, "slow");
12+
div.animate({ height: '100px', opacity: '0.4' }, "slow");
13+
div.animate({ width: '100px', opacity: '0.8' }, "slow");
14+
});
15+
});
16+
</script>
17+
</head>
18+
19+
<body>
20+
21+
<button>Start Animation</button>
22+
23+
24+
25+
<div style="background:#6fbd42;height:100px;width:100px;position:absolute;margin-top: 10px;"></div>
26+
27+
</body>
28+
29+
</html>

0 commit comments

Comments
 (0)