get left position based on container jquery

Solutions on MaxInterview for get left position based on container jquery by the best coders in the world

showing results for - "get left position based on container jquery"
Maria
21 Apr 2017
1const childPos = obj.offset();
2const parentPos = obj.parent().offset();
3const childOffset = {
4    top: childPos.top - parentPos.top,
5    left: childPos.left - parentPos.left
6}
7