0

My goal is to be able to take a draggable item and drop it on a collapsed div. When the item is dropped it will be appended to a div that is within the collapsed div.

Put simply, dropping on 'outter_collapsed' will place the item in 'inner'

<div id = "outter_collapsed">
<div id = "inner">
<!-- DROPPED ITEM PLACED HERE -->
</div>
</div>

Any ideas on how you would approach this or possible words of wisdom are welcome.

Thank you

Andrew
  • 13,757
  • 13
  • 66
  • 84

1 Answers1

0

Something like this maybe:

$( "#another-div" ).draggable();
        $( "#outter_collapsed" ).droppable({
            drop: function( event, ui ) {
                $(this).children().append(ui.draggable);

            }
        });

Check out an example here - http://jsfiddle.net/Bfa9v/19/

kmb64
  • 1,513
  • 2
  • 17
  • 29