position of element related to parent div in jquery code example
Example: position of element related to parent div in jquery
parent element should have position relative css property
$('child-element').position(); // { top : y, left : x}
parent element should have position relative css property
$('child-element').position(); // { top : y, left : x}