Skip to content

kyungw00k/element-client-rect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published