Tuesday, September 8, 2009

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.


0 comments:

Post a Comment

 

Web Tips Copyright © 2009 WoodMag is Designed by Ipietoon for Free Blogger Template