I'm trying to get the XY position of the mouse in a parent element. That part is simple, what's throwing me off is when there's a nested element, it then grabs the XY position of the mouse in that nested element.
I created a JS Fiddle with a very simple example: http://jsfiddle.net/htenchwv/
You can see how I'm pulling the position with this
$(".parent").mousemove(function(event){
$(".debug").html("X: "+ event.offsetX +"<br>Y: "+ event.offsetY);
});
You can see in either the X or Y position, the numbers jump down when you move into the child element. I'm at a loss for why or how I can prevent that behavior and gather ONLY the XY mouse in the parent element