X (Function)

For elements with a normal position, this retrieves the relative x position of the element on the page. For elements with a different position style (absolute, fixed, relative), the set “top” property is returned as the X position. Settings the X position follows normal styling rules. Setting the X position to an element with a position of default will have no effect.

Overloads

X() : Number – Gets the set x position, in pixels, of the element based on style rules.

X(Number pixels) : Element -  Sets the x position, in pixels, of the element,  following appropriate style rules.

Last edited Jan 27, 2011 at 11:58 PM by dahrkdaiz, version 1

Comments

No comments yet.