-
Notifications
You must be signed in to change notification settings - Fork 177
/
axis.html
49 lines (40 loc) · 1.99 KB
/
axis.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jquery.pep demo - constrained to axis</title>
<!-- Load local jQuery. -->
<script src="../libs/jquery/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
<!-- Load local lib and tests. -->
<script src="../src/jquery.pep.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.pep.x').pep({ axis: 'x', debug: true, useCSSTranslation: false });
$('.pep.y').pep({ axis: 'y', debug: true, useCSSTranslation: false });
$('.pep.auto').pep({ axis: 'auto', debug: true, useCSSTranslation: false });
$('.pep.x.trans').pep({ axis: 'x', debug: true, useCSSTranslation: true });
$('.pep.y.trans').pep({ axis: 'y', debug: true, useCSSTranslation: true });
$('.pep.auto.trans').pep({ axis: 'auto', debug: true, useCSSTranslation: true });
$('.pep.noease').pep({ axis: 'y', shouldEase: false, debug: true });
});
</script>
<style type="text/css">
body{ padding: 0; margin: 0; }
.pep { width: 100px; height: 100px; background: rgb(243, 200, 200); color: white; opacity: 0.8;}
.x { position: absolute; top: 40px; left: 10px; background: rgb(120, 200, 200); opacity: 0.8;}
.y { position: absolute; top: 60px; left: 30px; background: rgb(243, 120, 200); opacity: 0.8;}
.auto { position: absolute; top: 80px; left: 50px; background: rgb(143, 120, 200); opacity: 0.8;}
.noease { position: absolute; top: 100px; left: 70px; background: rgb(243, 80, 100); opacity: 0.8;}
</style>
</head>
<body>
<div class="pep x">X</div>
<div class="pep y">Y</div>
<div class="pep auto">auto X/Y</div>
<div class="pep x trans">X translation</div>
<div class="pep y trans">Y translation</div>
<div class="pep auto trans">auto X/Y translation</div>
<div class="pep noease">Y </br> ease disabled</div>
</body>
</html>