-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemo.html
executable file
·59 lines (50 loc) · 2.29 KB
/
demo.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
<!doctype html>
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Sauce.js - Add some flavor to the web!</title>
<meta name="description" content="Sauce.js demo page.">
<meta name="author" content="Jim Jeffers">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- <link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png"> -->
<link rel="stylesheet" href="demo.css?v=2">
<!-- TYPEKIT -->
<!-- <script type="text/javascript" src="http://use.typekit.com/kzv1uta.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script> -->
</head>
<body>
<div id="container">
<header>
<h1 class="tk-bistro-script-web" id="sauce">Sauce.js</h1>
<h2 class="tk-bistro-script-web" id="tagline">Add some flavor to the web!</h2>
</header>
</div>
<script type="text/javascript" charset="utf-8" src="src/easie.js"></script>
<script type="text/javascript" charset="utf-8" src="src/sauce.js"></script>
<script type="text/javascript" charset="utf-8">
window.onload = function() {
var headlineSauce = new Sauce();
headlineSauce.recipe(function(element){
element.change("y").from(-200).using(Easie.bounceOut);
element.change("scale").from(0.01).using(Easie.circOut);
}).duration(1).delay(1).putOn("sauce").onComplete(function(){
headlineSauce.recipe(function(element){
element.change("y").to(-200).using(Easie.backIn);
}).duration(1).delay(0).putOn("sauce")
});
var taglineSauce = new Sauce();
taglineSauce.recipe(function(element){
element.change("x").from(-200).to(-10).using(Easie.backInOut);
element.change("opacity").from(0).using(Easie.circOut).endingOnFrame(45)
element.change("scale").using(element.velocity("x", function(velocity){ return 1-velocity/100; }));
});
taglineSauce.delay(1.75).putOn("tagline");
}
</script>
</body>
</html>