1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>script.aculo.us Effects functional test file</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script src="../../lib/prototype.js" type="text/javascript"></script>
<script src="../../src/scriptaculous.js" type="text/javascript"></script>
<style type="text/css" media="screen">
/* <![CDATA[ */
div.demo { font-size: 70pt; float: left }
div#info { font: 10px/11px Tahoma, Arial, sans-serif; }
/* ]]> */
</style>
<script type="text/javascript" language="javascript" charset="utf-8">
// <![CDATA[
function startDemo() {
$$('div.demo').each( function(d) {
d.visualEffect(
['fade','appear','blind_up','blind_down','puff','switch_off','drop_out','shake',
'slide_up','slide_down','pulsate','squish','fold','grow','shrink'][Math.round(Math.random()*14)],
{ duration:0.5+Math.random()*5, delay: Math.random()*3 });
});
$('info').update(
Effect.Queues.get('global').collect( function(e) {
return e.inspect().escapeHTML()
}).join('<br/>'));
}
// ]]>
</script>
</head>
<body>
<h1>Random effects demo</h1>
<a href="#" onclick="startDemo(); return false;">Start...</a> |
<a href="#" onclick="$('info').toggle(); return false">Show/hide log</a>
<div class="demo" style="background-color:#f00"><div>
DIV1
</div></div>
<div class="demo" style="background-color:#ff0"><div>
DIV2
</div></div>
<div class="demo" style="background-color:#0f0"><div>
DIV3
</div></div>
<div class="demo" style="background-color:#0ff"><div>
DIV4
</div></div>
<div class="demo" style="background-color:#f00"><div>
DIV5
</div></div>
<div class="demo" style="background-color:#ff0"><div>
DIV6
</div></div>
<div class="demo" style="background-color:#f00"><div>
DIV7
</div></div>
<div class="demo" style="background-color:#ff0"><div>
DIV8
</div></div>
<div class="demo" style="background-color:#0f0"><div>
DIV9
</div></div>
<div id="info" style="clear:both; display:none"> </div>
</body>
</html>
|