Jquery ui drag drop how to wrap the item

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


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('<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 :slight_smile:

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