root/public/javascripts/scriptaculous/test/functional/tween_test.html

Revision 1, 1.2 kB (checked in by falcon, 17 years ago)

Version one -> initial work from the laptop.

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5  <title>script.aculo.us Effects functional test file</title>
6  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7  <script src="../../lib/prototype.js" type="text/javascript"></script>
8  <script src="../../src/scriptaculous.js" type="text/javascript"></script>
9  <script src="../../src/unittest.js" type="text/javascript"></script>
10<body>
11<h1>script.aculo.us Effects functional test file</h1>
12
13<p id="foo">test</p>
14
15<div style="height:2000px">...</div>
16     
17<script type="text/javascript">
18
19
20  $('foo').setBar = function(p){
21    this.setStyle('font-size: '+p+'px');
22  };
23  new Effect.Tween('foo', 10, 50, { duration: 4.0 }, 'setBar');
24  new Effect.Tween('foo', 10, 20, 'innerHTML');
25  new Effect.Tween('foo', 50, 0, {duration: 2.0}, function(p){
26    this.setStyle({border:p.toFixed(3)+'px solid red'});
27  });
28 
29 
30  new Effect.Tween(null, 0, 100, function(p){ scrollTo(0,p) });
31 
32  //new Effect.Tween(window, function(p){
33  //  this.scrollTo(0,p);
34  //}, $R(0,100))
35</script>   
36
37</body>
38</html>
Note: See TracBrowser for help on using the browser.