【发布时间】:2016-04-08 19:32:31
【问题描述】:
JSFiddle:https://jsfiddle.net/dy556efs/2/
左侧的元素在放到右侧时应该被克隆。目前,它们已完全移动 - 无法让克隆助手正常工作。
你能指出我正确的方向吗?
$(".social-msl-link-label").draggable({
connectToSortable: ".social-msl-group-list",
revert: "invalid",
helper: "clone"
});
$(".social-msl-links-order li").droppable({
accept : ".social-msl-link-label",
tolerance: 'pointer',
greedy : true,
hoverClass: 'highlight',
drop: function(ev, ui) {
$(ui.draggable).detach().css({position : 'relative', top: 'auto',left: 'auto'}).appendTo(this);
}
});
【问题讨论】:
标签: jquery jquery-ui jquery-ui-draggable jquery-ui-sortable jquery-ui-droppable