0
votes

I am using a Jquery Drag Drop UI script on page elements that are restricted by a container, I was just wondering if there was a way to always place the dragged div on top of the other child draggable elements.

Javascript function:

function dragIT(parent){
$("#"+parent).draggable({ containment: "#dashboard", scroll: false });
}

This function is called by the child/div - onmousedown / ondrag. However, dragged elements are sometimes hidden behind other divs which is something I don't want.

1

1 Answers

2
votes

http://jqueryui.com/demos/draggable/#visual-feedback has an example

function dragIT(parent){
$("#"+parent).draggable({ containment: "#dashboard", scroll: false, stack:"#"+parent+" div" });
}