无法拖动另一个div外的可拖动

时间:2015-03-03 09:21:35

标签: jquery jquery-ui

我使用jquery ui draggable / droppable。

我在我的css中禁用了所有z-index。

我尝试将绿色矩形div拖到左侧,并带有绿色的大号。

我无法将拖动的div移动到侧边栏之外。它似乎是在其父级内部捕获的,这是侧边栏。

为什么?是什么让这种情况发生?

由于nda等,我无法提供笔/小提琴......

enter image description here

1 个答案:

答案 0 :(得分:2)

overflow: visible ? 

JQuery Dragging Outside Parent

OR

$(".draggable").draggable({
        appendTo: 'body', // Append to the body.
        zIndex: <someNumberYouThinkIsAppropriateHere>,
        containment: $('document'),
        helper: 'clone'
    });

Drag item outside parent and into UI dialog