offset

v0.0.1
Get the x/y offset of an element
browser DOM

offset

Get the xy offset of an element

Installation

$ component install anthonyshort/offset

API

offset(document.querySelector('#foo')).top
offset(document.querySelector('#bar')).left

License

MIT

npm i offset

Metadata

  • MIT
  • Whatever
  • Anthony Short
  • released 4/14/2013

Downloads

Maintainers