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( )).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access