This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Effect.Move
Core Effects > Effect.Move
This effect moves an element by modifying its position attributes.
Syntax
This will move the object to the top left corner of the window (x=0; y=0):
new Effect.Move('object', { x: 0, y: 0, mode: 'absolute' });
This will move the object 30px up and 20px to the right relative to its current position:
new Effect.Move('object', { x: 20, y: -30, mode: 'relative' });
Options
| Options | Description |
|---|---|
| x | integer value, either the new absolute target of the effect elements left value or the modifier of its current left value, depending on the mode option |
| y | integer value, either the new absolute target of the effect elements top value or the modifier of its current top value, depending on the mode option |
| mode | string, defaults to 'relative', can also be 'absolute', specifies if the element is moved absolutely or relative to its own position. |
Demo
Source code of this demo
<style type="text/css">
a#move_demo { background:#fa0000; color:#fff; padding:5px; border:1px solid #000; }
</style>
<div class="demo">
<a href="#" id="move_demo" onclick="new Effect.Move(this, { x: 60, y: -30 }); return
false;">Click me for a demo!</a>
</div>







