WinJS.Utilities.getRelativeTop function

Gets the top coordinate of the element relative to the specified parent.

Syntax

var number = WinJS.Utilities.getRelativeTop(element, parent);

Parameters

  • element
    Type: DOMElement

    The element.

  • parent
    Type: DOMElement

    The parent element.

Return value

Type: Number

The relative top coordinate.

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Utilities