I'd like to be able to move an object into another with the function draggable of jQuery. I can move an object in the container and able to move in it. But when I try to add helper to objects to move, this no longer works. I want that when I select an item to deposit it in my container, it duplicates itself. Below is what I have managed to do for the moment:
$(".drag").draggable({
opacity: 0.7,
snap: '#drop',
cursor: "move",
revert: "invalid",
//helper: "clone"
});
$("#drop").droppable({
drop: function(event, ui) {
}
});
<div class="drag">
<p>Exemple bloc</p>
</div>
<div class="drag">
<p>Exemple bloc</p>
</div>
<div id="drop">
<p>Drop here</p>
</div>
The element I deposited in .drop
clone and must be able to move in the container .drop