Thanks for your solution, actually this is one of idea that I found (for example in mootools). But I would like to do this in some simpler way. For example now I dragging element that it is a little under the mouse (1 px down and 1 px left) and this work ok, but I would like to show this element centered oh.. Any other ideas?
Main Topics
Browse All Topics





by: Cometo1989Posted on 2008-06-03 at 07:44:38ID: 21700889
First let's clarify some things:
The onmouseover event fires when the mouse moves over a new element on the screen. The browser determines what that element is based on which elements (or parts of elements) are currently visible. Bubbling is the sending of the event to the elements up the DOM hierachy. It is not about sending events 'through' elements that are drawn on top of each other.
For your drag and drop application, perhaps you could use the coordinates of the "drop" event (e.g. an onmouseup event) and compare those with the coordinates of the various elements that can accept the dropped object. There is a lot on the web about how to do this, but here is some quick'n'dirty code to get you started.
Select allOpen in new window