$ionicPosition

A set of utility methods that can be use to retrieve position of DOM elements. It is meant to be used where we need to absolute-position DOM elements in relation to other, existing elements (this is the case for tooltips, popovers, etc.).

Adapted from AngularUI Bootstrap, (license)

Methods

position(element)

Get the current coordinates of the element, relative to the offset parent. Read-only equivalent of jQuery’s position function.

Param Type Details
element element

The element to get the position of.

  • Returns: object Returns an object containing the properties top, left, width and height.

offset(element)

Get the current coordinates of the element, relative to the document. Read-only equivalent of jQuery’s offset function.

Param Type Details
element element

The element to get the offset of.

  • Returns: object Returns an object containing the properties top, left, width and height.