File: effects_test.html

package info (click to toggle)
scriptaculous 1.9.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 952 kB
  • sloc: javascript: 8,533; makefile: 2
file content (74 lines) | stat: -rw-r--r-- 2,659 bytes parent folder | download | duplicates (6)
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
<!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>
  <script src="../../src/unittest.js" type="text/javascript"></script>
<body>
<h1>script.aculo.us Effects functional test file</h1>

<h2>Effect.Highlight</h2>

<div id="debug"> </div>

<a href="#" onclick="new Effect.SlideDown('d1'); return false;">asdasd</a>

<div id="d1" onclick="new Effect.SlideUp('d1');" style="overflow:hidden;"><div  style="background-color:#ff8080;">

  (highlight to red)

</div></div>

<div id="d2" style="width:100px;height:100px;background-color:#80ff80;">
  (highlight to greenish)
</div>

<div id="d3" style="width:100px;height:100px;background-color:#dde;">
  (bottom-right-grow)
</div>

<div id="d4" style="width:100px;height:100px;background-color:#dde;" onclick="Effect.Shake(this)">
  click to test shake
</div>

<div id="d5" style="width:100px;height:100px;background-color:#dde;" onclick="Effect.Puff(this)">
  click to test puff
</div>
<p>
  update callbacks: <span id="d5_after">(waiting)</span> -- <span id="d5_before">(waiting)</span>
</p>
<a href="#" onclick="$('d5').appear({beforeUpdate:before,afterUpdate:after}); return false;">show puff div again</a>

<a href="#" onclick="Effect.Appear('d6')">test appear</a>
<div id="d6" style="width:100px;height:100px;background-color:#dde;display:none">
  appear
</div>

<a href="#" onclick="Effect.Grow('d7')">test grow</a>
<div id="d7" style="width:100px;height:100px;background-color:#dde;display:none">
  grow
</div>

<a href="#" onclick="Effect.Pulsate('d8')">test pulsate default times (5)</a>
<a href="#" onclick="Effect.Pulsate('d8', {pulses: 2})">test pulsate 2 times</a>
<div id="d8" style="width:100px;height:100px;background-color:#dde;">
  pulsate
</div>
      
<script type="text/javascript" language="javascript" charset="utf-8">
// <![CDATA[
  new Effect.Highlight("d2",{startcolor:"#000000"});
  new Effect.Grow("d3",{duration:5.0,direction: 'bottom-right',opacityTransition:Effect.Transitions.linear});
  new Effect.BlindDown("d1");
  
  var afterUpdates = 0, beforeUpdates = 0;
  function after(){ afterUpdates++; $('d5_after').update(afterUpdates); }
  function before(){ beforeUpdates--; $('d5_before').update(beforeUpdates); }
// ]]>
</script>    

</body>
</html>