If I want to enable margin when measuring the width of an element, I can call element.outerWidth(true); However, I cannot find a similar way to get the left offset of an element in the container where the margin is on, element.position().left does not contain a field.
I tried element[0].getBoundingClientRect().left and this works, but is there a similar jquery call?
EDIT: It seems that the native javascript call above does not give me a field.
javascript jquery position
user1506145
source share