element-client-rect

1.0.4 • Public • Published

element-client-rect

Build Status JavaScript Style Guide NPM version NPM download Dependency Status DevDependency Status

Returns the size of an element and its absolute position of the document.

Install

$ npm install element-client-rect

API

getElementClientRect(el)

var getElementClientRect = require('element-client-rect')
var dom = document.body

var rect = getElementClientRect(dom)
// => {left: number, top: number, right: number, bottom: number, width: number, height: number}

Tested

  • IE 6+
  • Chrome latest
  • Safari latest
  • Firefox latest
  • iOS 8.1+
  • Android 4.0+

License

MIT

Package Sidebar

Install

npm i element-client-rect

Weekly Downloads

31

Version

1.0.4

License

MIT

Last publish

Collaborators

  • kyungw00k