File: effects_queue_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 (67 lines) | stat: -rw-r--r-- 2,285 bytes parent folder | download | duplicates (7)
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
<!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>
  <style type="text/css" media="screen">
  /* <![CDATA[ */
    #d1 { background-color: #fcb; width: 200px; height: 200px; float:left; }
    #d2 { background-color: #cfb; font-size: 2em; width: 200px; height: 200px; float:left; }
    #d3 { background-color: #bcf; font-size: 2em; width: 200px; height: 200px; float:left; }
  /* ]]> */
  </style>
  
</head>
<body>
<h1>script.aculo.us Effects functional test file</h1>

<h2>Effect.Queue</h2>

<div id="d1" style="font-size: 2em;">
  <p style="font-size:1em;">Lorem ipsum dolor sit amet</p>
</div>

<div id="d2">
  <p>Lorem ipsum dolor sit amet</p>
</div>

<div id="d3">
  <p>Lorem ipsum dolor sit amet</p>
</div>

<div style="clear: both">
  <a href="#" onclick="startTimeline(); return false;">Start queued effects</a> (in 'global' queue)
</div>

<div id="sliding"><div style="background-color:#ccc;font-size:20px;height:300px;width:150px;">
  <a href="#" onclick="Effect.SlideUp('sliding',{queue:{scope:'myscope', position:'end'}}); Effect.SlideDown('sliding',{queue:{scope:'myscope', position:'end'}}); return false;">
    Do a bit sliding in parallel, with a scoped queue
  </a>
</div></div>

<script type="text/javascript" language="javascript" charset="utf-8">
// <![CDATA[
  function startTimeline() {
    // 3x highlight in front
    for(var i=0; i<3; i++)
      new Effect.Highlight('d3', { duration: 1.0, queue: 'front' });
    
    // insert scale at very beginning
    new Effect.Scale('d1', 75, { scaleContent: true, duration: 1.0, queue: 'front' });
    
    // parallel implied, delay 0.5 sec
    new Effect.Highlight('d1', { delay: 0.5 }); 
    
    // puff at end
    new Effect.Puff('d2', { duration: 4.0, queue: 'end' });
  }
// ]]>
</script>


</body>
</html>