source: cows/branches/cows-vis/cows/pylons/project_templates/cows_server/+package+/public/js/yui/examples/anim/basic_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/basic_clean.html@5259
Revision 5259, 2.0 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>Basic Animation</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>Basic Animation</h1>
33
34<div class="exampleIntro">
35        <p>This demonstrates how to animate the <code>opacity</code> of an element.</p>
36<p> Click the X in the header to fade the element out.</p>
37                       
38</div>
39
40<!--BEGIN SOURCE CODE FOR EXAMPLE =============================== -->
41
42<div id="demo" class="yui-module">
43    <div class="yui-hd">
44        <h4>Animation Demo</h4>
45        <a href="remove.php?id=#demo" title="remove module" class="yui-remove"><em>remove</em></a>
46    </div>
47    <div class="yui-bd">
48        <p>This an example of what you can do with the YUI Animation Utility.</p>
49        <p><em>Follow the instructions above to see the animation in action.</em></p>
50    </div>
51</div>
52
53<script type="text/javascript">
54YUI({base:"../../build/", timeout: 10000}).use("anim-base", function(Y) {
55    var anim = new Y.Anim({
56        node: '#demo',
57        to: { opacity: 0 }
58    });
59
60    var onClick = function(e) {
61        e.preventDefault(); 
62        anim.run();
63    };
64
65    Y.get('#demo .yui-remove').on('click', onClick);
66
67});
68
69</script>
70
71<!--END SOURCE CODE FOR EXAMPLE =============================== -->
72
73</body>
74</html>
75<!-- delightfuture.corp.yahoo.com uncompressed/chunked Wed Aug 13 16:45:29 PDT 2008 -->
Note: See TracBrowser for help on using the repository browser.