Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robbestad/dom-find
Utils for finding DOM elements. Used by react-stickydiv
https://github.com/robbestad/dom-find
Last synced: 20 days ago
JSON representation
Utils for finding DOM elements. Used by react-stickydiv
- Host: GitHub
- URL: https://github.com/robbestad/dom-find
- Owner: robbestad
- Created: 2015-06-03T11:19:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-04T12:45:19.000Z (over 9 years ago)
- Last Synced: 2024-04-13T17:10:57.461Z (8 months ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Find DOM utils
Utils for finding DOM elements. Used by [react-stickydiv][1]
```js
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
```js
var util = require('dom-find');// util.findPos(React.findDOMNode());
// [0,100]// util.findPosRelativeToViewport(React.findDOMNode());
// [50,-200]```
[1]: https://github.com/svenanders/react-stickydiv