dom-find

Simple DOM finder for finding elements on page

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
dom-find
0.3.57 years ago7 years agoMinified + gzip package size for dom-find in KB

Readme

Find DOM utils
Utils for finding DOM elements. Used by react-stickydiv1
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]