How can you tell if one div tag/element is over another?
Working on a drag and drop feature and I would like to know/have an opinion on how you can tell if an element, in this case a div tag, is position (via the drag) ov开发者_Python百科er another element?
Thanks, R.
You should look into a framework such as jQuery to handle things like this easily, however if you want to learn exactly how it works, Quirksmode has a good tutorial on drag and drop (probably more information then you want).
Are you writing straight Javascript, or using an external library that already implements drag-n-drop, like Scriptaculous?
精彩评论