Javascript Reference
Categories: layer

javascript layer moveBy( )

@March 15, 2008, 1:22 a.m.
moveBy( )NN |4| IE n/a Chrome/Safari/DOM n/a  

moveBy(deltaX, deltaY)

  

A convenience method that shifts the location of the current element by specified pixel amounts along both axes. To shift along only one axis, set the other value to zero. Positive values for deltaX shift the element to the right; negative values to the left. Positive values for deltaY shift the element downward; negative values upward. This method comes in handy for path animation under the control of a setInterval( ) or setTimeout( ) method that moves the element in a linear path over time.

 
Parameters
 
  • Positive or negative pixel count of the change in horizontal direction of the element.
  • Positive or negative pixel count of the change in vertical direction of the element.
 
Returned Value

None.


Powered by Linode.