Nougat Predominant Middleware

    bloody-offset

    0.0.0 • Public • Published

    offset

    browser support

    install

    $ npm install bloody-offset

    require

    var offset = require("bloody-offset")

    api

    offset(element) > object

    returns element's offset

    • object.height : integer, element's height
    • object.width : integer, element's width
    • object.top : integer, element's top offset
    • object.left : integer, element's left offset

    example

    var elementOffset = offset(element)
     
    lightbox.style.top = elementOffset.top + "px"
    lightbox.style.left = elementOffset.left + "px"
    lightbox.style.display = "block"

    Keywords

    none

    Install

    npm i bloody-offset

    DownloadsWeekly Downloads

    753

    Version

    0.0.0

    License

    MIT

    Last publish

    Collaborators

    • bloodyowl