jquery get element at position code example
Example 1: jquery get relative position of element
//relative Position
let rel = $('.someClass').position();
//absolute Position
let abs = $('.someClass').offset();
Example 2: get left position based on container jquery
const childPos = obj.offset();
const parentPos = obj.parent().offset();
const childOffset = {
top: childPos.top - parentPos.top,
left: childPos.left - parentPos.left
}