page-position
v1.0.1
Published
Retrieve the position of an element relative to the page.
Downloads
3
Readme
page-position
Retrieve the position of an element relative to the page.
Returns an object describing a rendered element's top, right, bottom, and left distances from the document's polar origin.
Installation
Install via npm:
$ npm i page-position --save
Usage
var pagePosition = require('page-position');
pagePosition(document.getElementById('target'));