0.3.5 • Published 9 years ago

dom-find v0.3.5

Weekly downloads
1,321
License
ISC
Repository
-
Last release
9 years ago

Find DOM utils

Utils for finding DOM elements. Used by react-stickydiv

var util = require('dom-find');

// util.findPos(document.getElementById("element"));
// [0,100]

// util.findPosRelativeToViewport(document.getElementById("element"));
// [50,-200]

You can also use this with React

var util = require('dom-find');

// util.findPos(React.findDOMNode());
// [0,100]

// util.findPosRelativeToViewport(React.findDOMNode());
// [50,-200]