Hi,
suppose, I have 2 or more container (droppables). In these containers residing are any draggables.
When the user drags a draggable from one container to another, I need to find out, from which container the draggable was dragged.
This is my code, so far..
BR
Tobias
- $(function() {
$( ".draggable" ).draggable();
$( ".droppable" ).droppable({
drop: function( event, ui ) {
$( this )
.addClass( "ui-state-highlight" )
.find( "#droppable" )
.html( "dropped!" );
// Source (Droppable)
// TODO: How to find out?
// Target (Droppable)
targetName = $(this).attr('id');
// Objekt ID des Draggable ermitteln
oid = ui.draggable.find('p').attr('id');
oid = oid.replace('oid', '');
move(oid, g_cols_links, g_cols_oben);
links();
oben();
}
});
});