Effect.Move |
This effect moves an element. Effect.MoveBy is older name.
Availability
script.aculo.us V1.0 and later.
Syntax
new Effect.Move('id_of_element', y, x, [options]); new Effect.Move(element, y, x, [options]);
Examples
This will move object to corner of the window (x=0; y=0):
new Effect.Move (obj,{ x: 0, y: 0, mode: 'absolute'});
This will move object 30px up and 20px to the right (the default mode is ‘relative’):
new Effect.Move (obj,{ x: 20, y: -30, mode: 'relative'});
Options
For more informations about options see Core Effects (part about Common parameters)
Notes
Make sure all the elements you are moving is either absolute or relative. Leaving out the ‘position’-tag will break IE compability (it will work in Firefox though)
|