webgui/www/extras/yui/examples/animation/anim_from.html
2007-07-05 04:23:55 +00:00

29 lines
1.1 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Animation Example - Using From</title>
<link rel="stylesheet" type="text/css" href="css/demo.css">
<script type="text/javascript" src="../../build/yahoo/yahoo.js"></script>
<script type="text/javascript" src="../../build/event/event.js"></script>
<script type="text/javascript" src="../../build/dom/dom.js"></script>
<script type="text/javascript" src="../../build/animation/animation.js"></script>
<script type="text/javascript">
YAHOO.example.init = function() {
var anim = new YAHOO.util.Anim('demo', { width: {from: 600, to: 300} });
YAHOO.util.Event.on(document, 'click', anim.animate, anim, true);
};
YAHOO.util.Event.onAvailable('demo', YAHOO.example.init);
</script>
</head>
<body id="animation-demo-from">
<div id="doc">
<h1>Animation Example - Using From</h1>
<p>This example demonstrates how to use the &quot;from&quot; property of an animation attribute.</p>
<p>Click anywhere to start animation.</p>
<div id="demo"></div>
</div>
</body>
</html>