我在受容器限制的页面元素上使用 Jquery Drag Drop UI 脚本,我只是想知道是否有办法始终将拖动的 div 放在其他子可拖动元素之上。
Javascript 函数:
function dragIT(parent){
$("#"+parent).draggable({ containment: "#dashboard", scroll: false });
}
此函数由子/div - onmousedown/ondrag 调用。但是,拖动的元素有时会隐藏在其他 div 后面,这是我不想要的。
最佳答案
http://jqueryui.com/demos/draggable/#visual-feedback有一个例子
function dragIT(parent){
$("#"+parent).draggable({ containment: "#dashboard", scroll: false, stack:"#"+parent+" div" });
}
关于javascript - Jquery 拖放 z-index,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10037758/