只将一个元素放在前面的droppable中 [英] dropping an element only into the droppable that is in front

查看:270
本文介绍了只将一个元素放在前面的droppable中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些可拖放区域,也是可拖动的。可能发生的是,两个或更多个可放置区域将彼此相背。有没有办法将可拖动项目只放到前面的区域? (z-index)

I have some droppable areas, which are also draggable. It can happen that two or more droppable areas will get behind each other. Is there a way to drop a draggable item only into the area that is in the front? (z-index)

现在情况是,项目被添加到所有重叠的区域。

The situation is now, that the item gets added to all the areas, that are overlapping.

谢谢

推荐答案

我想和你分享...
我已经建立一个小插件

Ok I have now a quite good solution and I want to share it with you guys... I have build a small plugin

https://github.com/vaceta/jquery-top-droppable

这篇关于只将一个元素放在前面的droppable中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆