Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/altmshfkgudtjr/eleposition
Get Element position & information
https://github.com/altmshfkgudtjr/eleposition
dom npm position
Last synced: about 2 months ago
JSON representation
Get Element position & information
- Host: GitHub
- URL: https://github.com/altmshfkgudtjr/eleposition
- Owner: altmshfkgudtjr
- License: mit
- Created: 2020-11-26T14:13:58.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-30T08:13:58.000Z (about 4 years ago)
- Last Synced: 2024-11-21T05:25:46.370Z (2 months ago)
- Topics: dom, npm, position
- Language: JavaScript
- Homepage: https://altmshfkgudtjr.github.io/ELEposition/
- Size: 583 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ELEposition ![GitHub license](https://camo.githubusercontent.com/890acbdcb87868b382af9a4b1fac507b9659d9bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![img](https://img.shields.io/github/v/release/altmshfkgudtjr/ELEposition?color=%2312b886)](https://github.com/altmshfkgudtjr/ELEposition/releases/tag/v.1.0.0)
**Get Element position & information**
## How to use?
```javascript
import getElmentPosition from 'eleposition'
// or
const eleposition = require("eleposition")
const getElmentPosition = eleposition.default;const target = document.querySelector("#Element");
const result = getElementPosition(target);
```## Return
```javascript
// return Object
{
target: ,
leftTop: {
x: ,
y:
},
rightTop: {
x: ,
y:
},
leftBottom: {
x: ,
y:
},
rightBottom: {
x: ,
y:
},
width: ,
height:
}
```### Demo Page
📢 https://altmshfkgudtjr.github.io/ELEposition/