source: cows/branches/cows-vis/cows/pylons/project_templates/cows_server/+package+/public/js/yui/examples/anim/easing_clean.html @ 5259

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/cows/branches/cows-vis/cows/pylons/project_templates/cows_server/+package+/public/js/yui/examples/anim/easing_clean.html@5259
Revision 5259, 2.2 KB checked in by domlowe, 11 years ago (diff)

adding yui javascript

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2<html>
3<head>
4<meta http-equiv="content-type" content="text/html; charset=utf-8">
5<title>Animation Easing</title>
6
7<style type="text/css">
8/*margin and padding on body element
9  can introduce errors in determining
10  element position and are not recommended;
11  we turn them off as a foundation for YUI
12  CSS treatments. */
13body {
14        margin:0;
15        padding:0;
16}
17</style>
18
19<link type="text/css" rel="stylesheet" href="../../build/cssfonts/fonts-min.css" />
20<script type="text/javascript" src="../../build/yui/yui-min.js"></script>
21
22
23<!--begin custom header content for this example-->
24<link href="assets//anim.css" rel="stylesheet" type="text/css">
25
26<!--end custom header content for this example-->
27
28</head>
29
30<body class=" yui-skin-sam">
31
32<h1>Animation Easing</h1>
33
34<div class="exampleIntro">
35        <p>This demonstrates how to use the <code>easing</code> attribute to change the behavior of the animation.</p>
36<p> Click the icon in the header to shrink the element's <code>height</code> to zero with <code>Y.Easing.backOut</code>.</p>
37
38                       
39</div>
40
41<!--BEGIN SOURCE CODE FOR EXAMPLE =============================== -->
42
43   
44<div id="demo" class="yui-module">
45    <div class="yui-hd">
46        <h4>Animation Demo</h4>
47        <a title="collapse module" class="yui-toggle"><em>toggle</em></a>
48    </div>
49    <div class="yui-bd">
50        <p>This an example of what you can do with the YUI Animation Utility.</p>
51        <p><em>Follow the instructions above to see the animation in action.</em></p>
52    </div>
53</div>
54<p>This is placeholder text used to demonstrate how the above animation affects subsequent content.</p> 
55<script type="text/javascript">
56YUI({base:"../../build/", timeout: 10000}).use("anim-base", "anim-easing", function(Y) {
57    var anim = new Y.Anim({
58        node: '#demo .yui-bd',
59        to: { height: 0 },
60        easing: Y.Easing.backIn
61    });
62
63    var onClick = function(e) {
64        e.preventDefault();
65        anim.run();
66    };
67    Y.get('#demo .yui-toggle').on('click', onClick);
68
69});
70
71</script>
72
73<!--END SOURCE CODE FOR EXAMPLE =============================== -->
74
75</body>
76</html>
77<!-- delightfuture.corp.yahoo.com uncompressed/chunked Wed Aug 13 16:45:29 PDT 2008 -->
Note: See TracBrowser for help on using the repository browser.