-
Notifications
You must be signed in to change notification settings - Fork 24
/
init.html
52 lines (41 loc) · 1.22 KB
/
init.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
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Test: Init</title>
<style>
.square{
position: relative;
display: inline-block;
left:0;
width: auto;
height: auto;
vertical-align: text-bottom;
color: #fff;
background-color: #000;
padding: 20px;
}
</style>
</head>
<body>
<div id="square_1" class="square">1</div><br>
<div id="square_2" class="square">2</div><br>
<script type="text/javascript" src="../fat.js"></script>
<script>
Fat.animate("#square_1", { left: "50vw" },{ duration: 1000, callback: function(){
this.style.left = "";
Fat.animate("#square_1", { left: "50vw" },{ duration: 1000, init: true, callback: function(){
this.style.left = "0";
Fat.animate("#square_1", { left: "50vw" },{ duration: 1000, init: true });
}});
}});
Fat.animate("#square_2", { translateX: "50vw" },{ duration: 1000, callback: function(){
this.style.transform = "";
Fat.animate("#square_2", { translateX: "50vw" },{ duration: 1000, init: true, callback: function(){
this.style.transform = "translateX(0)";
Fat.animate("#square_2", { translateX: "50vw" },{ duration: 1000, init: true });
}});
}});
</script>
</body>
</html>