Skip to content

HenrikJoreteg/get-css-translated-position

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

get-css-translated-position

Get position of DOM elements positioned with CSS translate

install

npm install get-css-translated-position

example

var translatedPosition = require('get-css-translated-position')

// by default it doesn't account for element's offset
// on the page, just the value of its translation
translatedPosition(el) //=> {x: 5, y: 47}

// if you want it's position on the page pass the following option
translatedPosition(el, {includePageOffset: true}) //=> {x: 15, y: 147}

credits

If you like this follow @HenrikJoreteg on twitter.

license

MIT

About

Get position of DOM elements positioned with CSS translate

Resources

Stars

Watchers

Forks

Packages

No packages published