开发者

How can you tell if one div tag/element is over another?

开发者 https://www.devze.com 2022-12-11 04:36 出处:网络
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?

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

精彩评论

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

关注公众号