我该如何从带有overflow:auto的#draggable div中拖出我的物品?以下是示例。
http://jsfiddle.net/7rmY3/1/
使用选项:
'helper':'clone'
似乎可以让用户拖动该项
编辑,
如果您需要删除拖动的项目,请在可释放方法的drop事件中执行。我应用了一个索引id来标识物品,但这可以通过不同的方式实现。
$('#target').droppable({
drop: function(event,ui){
// Append the item in the droppable div
$(this).append($(ui.draggable));
// Remove the item from the draggable list
$('#draggable li#'+$(ui.draggable).attr('id')).remove();
}
});