Javascript Reference
Categories: layer

javascript layer moveTo( ), moveToAbsolute( )

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

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.

 
Parameters
 
  • Positive or negative pixel count relative to the top of the reference container, whether it is the next outermost layer (moveTo( )) or the page (moveToAbsolute( )).
  • Positive or negative pixel count relative to the left edge of the reference container, whether it is the next outermost layer (moveTo( )) or the page (moveToAbsolute( )).
 
Returned Value

None.


Powered by Linode.