How to get xy coordinates of child element from parent element, and not the(body)? How to get x value from DIV B to DIV A, so when window resizes, the values stay true???
var startPos = $("#divB").position();
$("#divB").draggable({
containment: 'parent',
stop: function(event, ui) {
var stopPos = $(this).position();
$("#firstInput").val((stopPos.left - startPos.left));
}
});
Is there a method to get this values directly and not from xy coordinates of whole screen?