当我拖动我提议的项目时,克隆助手被拖动,原始对象留在原位,但之后无法再次拖动。我需要能够两次拖动同一个对象。我该怎么做?
$('.drag').draggable({
helper: 'clone',
snap: '.drop',
grid: [60, 60],
revert: function(droppable) {
if (droppable === false) {
return true;
}
else {
return false;
}
}
});
$('.drop').droppable({
drop: function(event, ui) {
ui.draggable.fadeOut(1000);
}
});
$('.drag').hover(
function() {
$(this).stop().animate({
opacity: "0.8"
});
}, function() {
$(this).stop().animate({
opacity: "1"
});
});
$('.drop').droppable({
drop: function(event, ui) {
if (ui.draggable[10, 10].id) {
$(this).append($(ui.helper).clone().draggable());
}
}
});