The position of (X, Y) means the co-ordinate of an element at the top-left point in a document. X represent the horizontal position and Y represent the vertical position. Use element.getBoundingClientRect() property to get the position of an element.
Example 2: In this example, move the pointer over the document to get the position of an element.
- Upload and Retrieve Image on MongoDB using Mongoose
- How to retrieve data using HTTP with Observables in AngularJS ?
- Kotlin | Retrieve Collection Parts
- Retrieve Single Elements In Kotlin
- How to get position of an element relative to the document or parent using jQuery ?
- HTML | DOM Geolocation position Property
- HTML | DOM Style position Property
- HTML | DOM Progress position Property
- How to position a div at the bottom of its container using CSS?
- How to Change the Position of Scrollbar using CSS ?
- How to position relative to top of a text canvas using Fabric.js ?
- How to set position relative to top of a canvas circle using Fabric.js ?
- How to set position relative to left of a canvas circle using Fabric.js ?
- How to remove parent element except its child element using jQuery ?
- How to check an HTML element is empty using jQuery ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.