HTMLElement |
get
(el)
Returns an HTMLElement reference
|
Int |
getClientHeight
()
Returns the height of the client (viewport).
|
Int |
getClientWidth
()
Returns the width of the client (viewport).
|
Region |
getRegion
(el)
Returns the region position of the given element.
|
String |
getStyle
(el, <String> property)
Normalizes currentStyle and ComputedStyle.
|
Object |
getX
(el)
Gets the current X position of an element based on page coordinates.
|
Object |
getXY
(el)
Gets the current position of an element based on page coordinates.
|
Object |
getY
(el)
Gets the current Y position of an element based on page coordinates.
|
void |
setStyle
(el, <String> property, <String> val)
Wrapper for setting style properties of HTMLElements.
|
Object |
setX
(el, <Int> x)
Set the X position of an html element in page coordinates, regardless of how the element is positioned.
|
Object |
setXY
(el, <array> pos, noRetry)
Set the position of an html element in page coordinates, regardless of how the element is positioned.
|
Object |
setY
(el, y)
Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
|
Class YAHOO.util.Dom
Object | +--YAHOO.util.Dom
class
YAHOO.util.Dom
Method Summary [top]
Constructor Detail [top]
YAHOO.util.Dom
YAHOO.util.Dom
Method Detail [top]
get
HTMLElement
get
(el)
Returns an HTMLElement reference
- Parameters:
-
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
- Returns:
- A DOM reference to an HTML element.
getClientHeight
Int
getClientHeight
()
Returns the height of the client (viewport).
- Returns:
- The height of the viewable area of the page.
getClientWidth
Int
getClientWidth
()
Returns the width of the client (viewport).
- Returns:
- The width of the viewable area of the page.
getRegion
Region
getRegion
(el)
Returns the region position of the given element.
The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
- Parameters:
-
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
- Returns:
- A Region instance containing "top, left, bottom, right" member data.
getStyle
String
getStyle
(el, <String> property)
Normalizes currentStyle and ComputedStyle.
- Parameters:
-
property
- The style property whose value is returned. -
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
- Returns:
- The current value of the style property.
getX
Object
getX
(el)
Gets the current X position of an element based on page coordinates. The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- Parameters:
-
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
getXY
Object
getXY
(el)
Gets the current position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- Parameters:
-
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
getY
Object
getY
(el)
Gets the current Y position of an element based on page coordinates. Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- Parameters:
-
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
setStyle
void
setStyle
(el, <String> property, <String> val)
Wrapper for setting style properties of HTMLElements. Normalizes "opacity" across modern browsers.
- Parameters:
-
property
- The style property to be set. -
val
- The value to apply to the given property. -
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
setX
Object
setX
(el, <Int> x)
Set the X position of an html element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- Parameters:
-
x
- to use as the X coordinate. -
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
setXY
Object
setXY
(el, <array> pos, noRetry)
Set the position of an html element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- Parameters:
-
pos
- Contains X & Y values for new position (coordinates are page-based) -
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference.
setY
Object
setY
(el, y)
Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
- Parameters:
-
String
- | HTMLElement} Accepts either a string to use as an ID for getting a DOM reference, or an actual DOM reference. -
Value
- to use as the Y coordinate.