jQuery get position of element relative to another element April 1, 2023 by Tarik just do the subtraction your self… var relativeY = $("elementA").offset().top - $("elementB").offset().top;