Jquery ui drag drop how to wrap the item dropped
<p>my goal is to wrap the dropped
draggable item with some custom html
(all in all I have to wrap/append a X
for get rid of the selected item and put it
a the same spot or at least inside of
the draggable container)</p>

<p>I tried with two methods none of theme
worked for my goal :(
The first keep on the draggable
event e don't change position but the html
is shown in the item in the draggable
container :( (of course)
on the other end the second
lose the position and the draggable event
but the html is in the right place ....</p>

<p>So I'm wondering is there a way to wrap
the item with html without changing the position
,keeping on the draggable event and show the
html in the right container?</p>

<pre><code>var dragOptions = {
    cursor: 'move',
    //helper: "clone",
    start: function(event, ui) {},
    stop: function(event, ui) {
        /* with this I wrap the start item not the dropped item */
        $(ui.helper).addClass('justDropped');
        $(ui.helper).wrap('&lt;div class="item-wrapper"&gt;');
        $(ui.helper).parent('.item-wrapper').append('&lt;p&gt;CloseX&lt;/p&gt;');
        /* with this I lose position and draggable */
        var $droppable= $('#droppable');
        var $list = $( "ul", $droppable ).length ?
        $( "ul", $droppable ) :
        $( "&lt;ul class='gallery ui-helper-reset'/&gt;" ).appendTo( $droppable );
        $(ui.helper).removeAttr('style');
        $(ui.helper).parent('.item-wrapper').appendTo( $list );
    },
    containment: $('#droppable')
};
$('#items .draggable').draggable(dragOptions); 
</code></pre>
