Determine target's offsetY or layerY when dragging element over that target in javascript

Determine target's offsetY or layerY when dragging element over that target in javascript

I wrote a script to drag elements inside a div and to sort them while dragging. But I can't determine target's offsetY or layerY when the element is being dragged over that target. When dragging the draggable element sometimes stops (but the mouse still moves) or it's hard to move, as if when someone tries to do some action in windows and fails, as the CPU is overloaded.
Is there any way to determine target's offsetY or layerY and make this script work as it should?
Other frameworks are not an option. I want to make it in native javascript.

If there is a need, I can provide the script.

Add Comment

Put code snippets inside language tags:
[language] [/language]

Examples:
[javascript] [/javascript]
[actionscript] [/actionscript]
[csharp] [/csharp]

See here for supported languages.

Javascript must be enabled to submit anonymous comments - or you can login.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.