Name
moveBy( ) — NN 4 IE n/a DOM n/a
Synopsis
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.
Returned Value
None.
Parameters
-
deltaX
Positive or negative pixel count of the change in horizontal direction of the element.
-
deltaY
Positive or negative pixel count of the change in vertical direction of the element.
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.