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"

Readme

Keywords

none

Package Sidebar

Install

npm i bloody-offset

Weekly Downloads

1,136

Version

0.0.0

License

MIT

Last publish

Collaborators

  • bloodyowl