API/libsapojs/SAPO/Utility/Dimensions

[Elements] are optional

Class SAPO.Utility.Dimensions


class SAPO.Utility.Dimensions
Defined in Utility/Dimensions/0.1/lib.js

Function Summary
elementHeight (DOMElement|string element)
elementLeft (DOMElement|string element)
elementTop (DOMElement|string element)
elementWidth (DOMElement|string element)

Function Details

function elementDimensions

elementDimensions(element element)
Parameters:
element target element
Returns:
{Array} array with element's width and height

function elementHeight

elementHeight(DOMElement|string element)
Parameters:
element target DOM element or target ID
Returns:
{int} element height

function elementLeft

elementLeft(DOMElement|string element)
Parameters:
element target DOM element or target ID
Returns:
{int} element left position

function elementTop

elementTop(DOMElement|string element)
Parameters:
element target DOM element or target ID
Returns:
{int} element top position

function elementWidth

elementWidth(DOMElement|string element)
Parameters:
element target DOM element or target ID
Returns:
{int} element width

function pageHeight

pageHeight()
Returns:
{int} page height

function pageWidth

pageWidth()
Returns:
{int} page width

function scrollHeight

scrollHeight()
Returns:
{int} scroll height

function scrollWidth

scrollWidth()
Returns:
{int} scroll width

function viewportHeight

viewportHeight()
Returns:
{int} viewport height

function viewportWidth

viewportWidth()
Returns:
{int} viewport width