Drag & Drop between two containers

Drag & Drop between two containers


Hi!
I tried to do some dragging and dropping between to containers, but I
couldn't apply the correct combinations of options to be successful:
$(function() {
$("#item1").draggable();
$("#item2").draggable();
$("#container1").droppable();
$("#container2").droppable();
})
<div id="container1" style="height:100px;background-color:#CCC">
<div id="item1" class="ui-widget-content">

Hello

</div>
<div id="item2" class="ui-widget-content">

Hello

</div>
</div>
<div id="container2" style="height:100px;background-color:#AAA">
</div>
I would like to change the order of the items in the containers, and
to put one item from one containter into another container (e.g. drag
item1 from container1 into container2). Can you give me some advice
how to do this?
Thx!