链接到代码 - JS FIDDLE LINK
var makeDrag = function(){
$("#hello").draggable({
stop: function(){
alert("Done dragging");
$("#hello").draggable("destroy");
var copy = $("#hello").clone(true);
$("body").append(copy);
copy.html("DRAG");
copy.draggable();
copy.css("left","120px");
copy.css("top","140px");
makeDrag();
}
});
}
makeDrag();
<div id="hello">DRAG</div>//THIS DIV SHOULD BE FIXED IN THE SAME POSITION
我可以拖放,但我要修复 div hello 吗?如何做到这一点?例如示例链接