jquery get position of element relative to top of page 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();