How can I get the position of an element relative to another element with jQuery? July 12, 2023 by Tarik just do the subtraction your self… var relativeY = $("elementA").offset().top - $("elementB").offset().top;