README
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
Get the x/y offset of an element
<script type="module">
import anthonyshortOffset from 'https://cdn.skypack.dev/anthonyshort-offset';
</script>
Get the xy offset of an element
$ component install anthonyshort/offset
offset(document.querySelector('#foo')).top
offset(document.querySelector('#bar')).left
MIT