开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜