Name
moveTo( ), moveToAbsolute( ) — NN 4 IE n/a DOM n/a
Synopsis
moveTo(x
, y
)
moveToAbsolute(x
,
y
)
Convenience methods that shift the location of the current element to
a specific coordinate point. The differences between the two methods
show when the element to be moved is nested inside another positioned
container (e.g., a layer inside a layer). The moveTo( )
method uses the coordinate system of the parent
container; the moveToAbsolute( )
method uses the
coordinate system of the page. For a single layer on a page, the two
methods yield the same result.
Returned Value
None.
Parameters
-
x
Positive or negative pixel count relative to the top of the reference container, whether it be the next outermost layer (
moveTo( )
) or the page (moveToAbsolute( )
).-
y
Positive or negative pixel count relative to the left edge of the reference container, whether it be the next outermost layer (
moveTo( )
) or the page (moveToAbsolute( )
).
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.