global-offset

Element global offset

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
global-offset
500.1.77 years ago9 years agoMinified + gzip package size for global-offset in KB

Readme

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