Script.aculo.us

An introduction to the script.aculo.us [1] library.

1 Setup

2 Visual Effects

2.1 Core Effects

Option since Description
duration V1.0 [2] Duration of the effect in seconds, given as a float. Defaults to 1.0.
fps V1.0 [3] Target this many frames per second. Default to 25. Can’t be higher than 100.
transition V1.0 [4] Sets a function that modifies the current point of the animation, which is between 0 and 1. Following transitions are supplied: Effect.Transitions.sinoidal (default), Effect.Transitions.linear, Effect.Transitions.reverse, Effect.Transitions.wobble and Effect.Transitions.flicker.
from V1.0 [5] Sets the starting point of the transition, a float between 0.0 and 1.0. Defaults to 0.0.
to V1.0 [6] Sets the end point of the transition, a float between 0.0 and 1.0. Defaults to 1.0.
sync V1.0 [7] Sets whether the effect should render new frames automatically (which it does by default). If true, you can render frames manually by calling the render() instance method of an effect. This is used by Effect.Parallel().
queue V1.5 [8] Sets queuing options. When used with a string, can be ‘front’ or ‘end’ to queue the effect in the global effects queue at the beginning or end, or a queue parameter object that can have {position:’front/end’, scope:’scope’, limit:1}. For more info on this, see Effect Queues [9].
direction ?? Sets the direction of the transition. Values can be either ‘top-left’, ‘top-right’, ‘bottom-left’, ‘bottom-right’ or ‘center’ (Default). Applicable only on Grow and Shrink effects.

2.1.1 Effect Callbacks

Callback since Description
beforeStart V1.0 [10] Called before the main effects rendering loop is started.
beforeUpdate V1.0 [11] Called on each iteration of the effects rendering loop, before the redraw takes places.
afterUpdate V1.0 [12] Called on each iteration of the effects rendering loop, after the redraw takes places.
afterFinish V1.0 [13] Called after the last redraw of the effect was made.
function myCallBackOnFinish(obj){
  alert("the Element's id the effect was applied to is :" + obj.element.id);
}
function myCallBackOnStart(obj){
  alert("the Element object the effect will be applied to is :" + obj.element);
}

2.2 Combination Effects

Click for Effect.Appear demo
Click for Effect.Fade demo
Click for Effect.Puff demo
Click for Effect.BlindDown demo
Click for Effect.BlindUp demo
Click for Effect.SwitchOff demo
Click for Effect.SlideDown demo
Click for Effect.SlideUp demo
Click for Effect.DropOut demo
Click for Effect.Shake demo
Click for Effect.Pulsate demo
Click for Effect.Squish demo
Click for Effect.Fold demo
Click for Effect.Grow demo
Click for Effect.Shrink demo
Click for Effect.Highlight demo

3 Controls

3.1 Drag and Drop

This is the first list

  • Item 1 from first list.
  • Item 2 from first list.
  • Item 3 from first list.

And now the second list

  • HANDLE Item 1 from second list.
  • HANDLE Item 2 from second list.
  • HANDLE Item 3 from second list.

3.2 Autocompletion

3.3 In Place Editing

URLs

  1. script.aculo.us, http://script.aculo.us/
  2. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0
  3. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0
  4. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0
  5. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0
  6. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0
  7. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0
  8. V1.5, http://wiki.script.aculo.us/scriptaculous/show/V1.5
  9. Effect Queues, http://wiki.script.aculo.us/scriptaculous/show/EffectQueues
  10. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0
  11. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0
  12. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0
  13. V1.0, http://wiki.script.aculo.us/scriptaculous/show/V1.0

This talk available at http://jmvidal.cse.sc.edu/talks/scriptaculous/
Copyright © 2009 José M. Vidal . All rights reserved.

09 March 2007, 04:16PM