global-offset

0.1.7 • Public • Published

global-offset Build Status

Element global offset

Calculate offset of element with any position property.

Install

npm install --save global-offset

Usage

import offset from 'global-offset';

offset(document.querySelector('.hello')); // {left: 150, top: 0}

API

offset(element)

Return object with top and left offsets.

element

Type: element

Element for calculate offsets.

Related

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i global-offset

Weekly Downloads

838

Version

0.1.7

License

MIT

Last publish

Collaborators

  • andrepolischuk