Coffeekraken.io 0.0.1

offset

Get the offset top and left of the passed element from the document top left point

Name Type Description Status Default
elm { HTMLElement } The element to get the offset from required

Return { Object } The offset top and left object

Example

    import offset from 'sugarcss/js/dom/offset'
const offsetElm = offset(myCoolElement);
// output : { top : 200, left : 300 }

Author : Olivier Bossel olivier.bossel@gmail.com