Suelte arrastrable en div colapsado

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.

¡Gracias

preguntado el 03 de mayo de 12 a las 18:05

1 Respuestas

Algo como esto tal vez:

$( "#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/

contestado el 04 de mayo de 12 a las 04:05

Now what if the item that is being dropped on "outter_collapse" is a sortable item? - Anticomandante

nothing much it will still work. just add $( "#another-div" ).sortable(); - kmb64

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.