I want to get the offset of an element relative to a specific parent not the direct one and not the document.
I looked for that on the internet and found the of
you need to subtract as OffSet implies the navigator window
var offset = GetOffSet( $("#a"), $("#b") ); function GetOffSet( elem, elemParent ) { return elemParent.position().left - elem.parent().position().left; }