jquery calulate offset relative to parent 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();