-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·86 lines (66 loc) · 2.07 KB
/
index.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="robots" content="index,follow">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Drifterjs Demo</title>
<script type="text/javascript" src="vendor/jquery.js"></script>
<script type="text/javascript" src="js/drifter.js"></script>
<style type="text/css">
.container{
position: relative;
border: 1px solid #999;
background: #666;
width: 800px;
height: 800px;
}
#startBaloon{
cursor: pointer;
width: 50px;
color: #FFF;
text-align: center;
font-family: Helvetica;
}
.demoOne{
background: black;
height: 20px;
width: 20px;
border-radius: 3px;
position: absolute;
top: 800px;
left: 600px;
}
.demoOne.variance{
background: #83c000;
}
</style>
</head>
<body>
<header>
<h2>Drifter Demo</h2>
</header>
<div class="container">
<div id="startBaloon" class="demoOne">Click</div>
</div>
</body>
<script type="text/javascript">
var drifter = new Drifter(".demoOne", {
effect : "balloon", // try changing to "speedy_trails" to see a different effect
parent : $('.container'),
end : {top: 200, left: 200},
// These are commented b/c we are using a packaged effect "balloon" which sets
// these different variables. They are here for referrence.
// varianceBoundary : 75, // how much will the dots move away from bearing
// effectPace: 800, // ms at which dots are placed
// divisionPercentage: 100 // 1 - 100 value dictates how often dots will stray from bearing
});
$("#startBaloon").on('click', function(){
$(this).fadeOut(500, $.proxy(function(){
$(this).text(''); // do not want to clone this text
drifter.start($(this));
}, this));
});
</script>
</html>