Hi,
my goal is to drag the draggable item
and when stop drag wrap it width custom html
the item don't have change position or lose the
draggable event.


I try with two methods but they doesn't work
PHP Code:
var dragOptions = {
                     
cursor'move',
                     
//helper: "clone",
                     
start: function(eventui) {},
                     
stop: function(eventui) {
                         
/* with this I wrap the start item not the dropped item */
                        
$(ui.helper).addClass('justDropped');
                        $(
ui.helper).wrap('<div class="item-wrapper">');
                        $(
ui.helper).parent('.item-wrapper').append('<p>CloseX</p>');
                        
/* with this I lose position and draggable */
                        
var $droppable= $('#droppable');
                        var 
$list = $( "ul"$droppable ).length ?
                        $( 
"ul"$droppable ) :
                        $( 
"<ul class='gallery ui-helper-reset'/>" ).appendTo$droppable );
                        $(
ui.helper).removeAttr('style');
                        $(
ui.helper).parent('.item-wrapper').appendTo$list );
                     },
                     
containment: $('#droppable')
                 };
                 $(
'#items .draggable').draggable(dragOptions); 
Can you help me, please ?
Bye

Ps
I've also tried with the droppable plugin
but I have to face quite the same problems.