jquery get position of element relative to top container code example
Example: jquery get relative position of element
//relative Position
let rel = $('.someClass').position();
//absolute Position
let abs = $('.someClass').offset();
//relative Position
let rel = $('.someClass').position();
//absolute Position
let abs = $('.someClass').offset();