get position from top element jquery 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();