root/public/javascripts/scriptaculous/test/functional/effects_random_demo.html @ 11

Revision 1, 2.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  <style type="text/css" media="screen">
10  /* <![CDATA[ */
11    div.demo { font-size: 70pt; float: left }
12    div#info { font: 10px/11px Tahoma, Arial, sans-serif; }
13  /* ]]> */
14  </style>
15  <script type="text/javascript" language="javascript" charset="utf-8">
16  // <![CDATA[
17  function startDemo() {
18    $$('div.demo').each( function(d) {
19      d.visualEffect(
20      ['fade','appear','blind_up','blind_down','puff','switch_off','drop_out','shake',
21       'slide_up','slide_down','pulsate','squish','fold','grow','shrink'][Math.round(Math.random()*14)],
22       { duration:0.5+Math.random()*5, delay: Math.random()*3 });
23    });
24    $('info').update(
25      Effect.Queues.get('global').collect( function(e) {
26        return e.inspect().escapeHTML()
27      }).join('<br/>'));
28  }
29  // ]]>
30  </script>
31</head>
32<body>
33<h1>Random effects demo</h1>
34<a href="#" onclick="startDemo(); return false;">Start...</a> |
35<a href="#" onclick="$('info').toggle(); return false">Show/hide log</a>
36
37<div class="demo" style="background-color:#f00"><div> 
38DIV1
39</div></div>
40
41<div class="demo" style="background-color:#ff0"><div> 
42DIV2
43</div></div>
44
45<div class="demo" style="background-color:#0f0"><div> 
46DIV3
47</div></div>
48
49<div class="demo" style="background-color:#0ff"><div> 
50DIV4
51</div></div>
52
53<div class="demo" style="background-color:#f00"><div> 
54DIV5
55</div></div>
56
57<div class="demo" style="background-color:#ff0"><div> 
58DIV6
59</div></div>
60
61<div class="demo" style="background-color:#f00"><div> 
62DIV7
63</div></div>
64
65<div class="demo" style="background-color:#ff0"><div> 
66DIV8
67</div></div>
68
69<div class="demo" style="background-color:#0f0"><div> 
70DIV9
71</div></div>
72
73<div id="info" style="clear:both; display:none"> </div>
74
75</body>
76</html>
Note: See TracBrowser for help on using the browser.