Get the xy offset of an element
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
History.md
Makefile
Readme.md
component.json
index.js
package.json

Readme.md

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